Hi,
I updated my MG version from 3.6 to 3.7, and I encountered a weird behaviour.
As you can see below, I have a terrain made of chunks (each drawn separately), but all the chunks are just copies of one single chunk (which seem to be chosen depending on where the camera looks at…):
this.VertexBuffer.VertexCount instead of this.IndexBuffer.IndexCount would be better ? There are 3 vertices per triangle, not imperatively as many indices as vertices in a model.
Or maybe it is too early in the morning for me to post
Alright so I simplified the project as I could, here is the sample which basically creates a quad tree and draws it.
There are no much comments, and also a few other minor problems which you shouldn’t notice.
My environment is OSX and I am using Visual Studio, the project type is DesktopGL (MG 3.7).
The three important files are in Engine -> Environment -> Terrain:
World.cs: Draw method supposed to draw the entire world
TerrainQuadTree.cs: DrawScene method calls the draw method of the root node of the quad tree
TerrainQuadChild.cs: DrawTerrain method draws the chunk
It is pretty straightforward, let me know if you encounter any issue.
(You may have to build the content manually with the pipeline tool.)