c# - XNA Drawing Terrain in the wrong places -
c# - XNA Drawing Terrain in the wrong places -
i need draw terrain , have photographic camera surfacefollow in xna, in places doesnt draw suposed draw , draws terrain behind it. suggestions of may be?
public void draw() { camera.effect.textureenabled = true; camera.effect.vertexcolorenabled = false; camera.effect.world = worldmatrix; camera.effect.texture = texture; camera.effect.currenttechnique.passes[0].apply(); device.setvertexbuffer(vertexbuffer); device.indices = indexbuffer; (int = 1; < (alturas.height - 1); i++) { device.drawindexedprimitives(primitivetype.trianglestrip, 0, 0, heights.width * 2, (heights.width * 2) * i, (heights.width * 2) - 2); } }
heights texture of height map. construction of vertices working fine.
c# xna terrain
Comments
Post a Comment