xna 4.0 - XNA 4.0: terrain glitches caused by SpriteBatch -
i'm trying implement terrain collision in xna i've added dynamic text allows me test whether calculations correct. rendered fine until called:
spritebatch.begin(); spritebatch.end();
or
spritebatch.begin(spritesortmode.backtofront, blendstate.alphablend); spritebatch.end();
with these instructions terrain glitches little bit, when remove these 2 lines code normal (but means cannot draw hud)
anyone has clue can cause , how should fix it?
screens:
it due spritebatch change graphicsdevice states...
before drawing terrain should store right renderstates...
usually have set right rasterizerstate , depthstencilstate.
common values rasterizarstate.cullnone , depthstencilstate.default
Comments
Post a Comment