• Advertisement
Sign in to follow this  

Creating Terrain Mesh

This topic is 4307 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am having a problem. i got the terrain creation system down. using manual vertex buffers and index buffers. now i am trying to go to a mesh object. my code here works great on my pc at work but at home on my laptop it sometimes works, sometimes locks up, and even when it works it doesnt always render. using some debug statements i can find the crash to be after the vertex buffer is filled in the mesh but before the index buffer is finished. here is the mesh creation code and the parts i is an array of int16's that describe the faces of the model v is the array of CustomVertex.PositionNormalTextured *code* tmesh = New Mesh(i.GetUpperBound(0) / 3, v.GetUpperBound(0), 0,CustomVertex.PositionNormalTextured.Format, Me.dev) Me.AddToDebugger("Building TerrainMesh: Mesh Created") tmesh.SetVertexBufferData(v, LockFlags.NoSystemLock) Me.AddToDebugger("Building TerrainMesh: Mesh vb filled") ' usually gets passed here but no more debug statments are written tmesh.SetIndexBufferData(i, LockFlags.NoSystemLock) Me.AddToDebugger("Building TerrainMesh: Mesh ib filled")

Share this post


Link to post
Share on other sites
Advertisement
it seems like to me it is getting into an endless loop at the setindexdata part. in taskmanager it is still running with 50% cpu usage but no reactions in the application.

incase i forgot to say so this is managed vb.net

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement