problem with 2d/3d drawing in directX 9

Started by
4 comments, last by Anthe 20 years, 3 months ago
I am trying to make a 3d scene with 2d panels drawed in the orthogonal mode. 3d scene works fine without 2d panels but when I turn the panels on then everything disappears. Also there seems to be no problem if I turn the lighting off during the 3d drawing. Any ideas what could cause this?
Advertisement
"when I turn the panels on then everything disappears."

Actually everything in the 3d scene disappears, 2d panels can be seen. But FPS is the same if 3d scene is drawn so it seems that after 3d drawing the screen is somehow filled with the black color
You might want to make sure your RenderStates are changed back when you have to render the 3d stuff.
If you have a panel that covers the whole screen, make sure you''re using the aplha channel(s) or colorkey(s).
before 3d drawing I enable D3DRS_ZENABLE and D3DRS_LIGHTING, and these are disabled before 2d drawing. Is there needed any other RenderState changes?

2d panel is not covering the whole screen and it uses alpha channel and it works perfectly without D3DRS_LIGHTING state enabled during the 3d drawing
I solved the problem with id3dxsprite, now everything works just fine.

This topic is closed to new replies.

Advertisement