   Using orthogonal and perspective projections together
  Now why would I want to do that? It''s because I''m havin'' a world, which is in perspective view, and a control panel, which is in orthogonal view. I''m sure there are other ways of doin'' it and this is why I''m askin'' here, weather or not this is the best approach. Say after I sent all my world objects down to DrawPrimitive() in perspective view, and I decided it''s time to render my control panel in orthogonal before I do an EndScene().So how do I go about doing that? I don''t want to use RHW vertices because with that I can''t use a tranformation matrix when I need to slide the control panel out of sight (doing it in RHW will require vertex positions to be updated everytime the control panel/menu move, and thus lockin''/unlockin'' VB).If you guys have any experiences to share, they''ll be very much appreciated. Thanks 
  I think you''re looking for mirroring/portal techniques. As I understand it, these allow you to render scenes within scenes. You might also want to look at the Render-To-Texture samples in the Nvidia effects browser. These should allow you to render to a texture and then use a RHW for your control panel with the newly created texture.But... if your control panel isn''t composed of 3d objects, I''d say your probably still better off using RHW with Drawprimitive (not DrawPrimitiveUp). Works fine for me, and I''m writing in VB and it''s plenty fast enough.    Always prey on the weak, the timid and the stupid. Otherwise you''ll just get your butt kickedFor a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ... ;Pseudo-code:BeginSceneSetPerspectiveViewDrawPerspectiveStuffSetOrthogonalViewDrawOrthogonalStuffEnd Scene Stay Casual,KenDrunken Hyena;  Thanks guys, the information has been helpful. The reason I didn''t want to use RHW approach because I have to update each vertex position each time a move occurs, which can be slower than transformation done in hardware. I think I''ll stick with the orthogonal way. So for the case of a menu, each of the buttons in it will have an IB, since buttons have different texture from the menu background, these IBs will be used to render a portion of the entire VB with their own textures. Rather than switchin'' VBs, it''s best to switch only IBs for each buttons in the menu. That''s to say, for drawin'' a menu:SetOrthogonalViewSetStreamSource(EntireMenuVB)SetTexture(MenuBackground)DrawIndexedPrimitive(MenuBackground IB)SetTexture(Menu Buttons)DrawIndexedPrimitive(Button IB)EndScene() ;  I have been trying to do this for a while and I have the problem that all the stuff I draw in ortho mode is drawn "behind" the stuff I have drawn in perspective mode. I am doing it as stated above (set perspective/draw perspective/set ortho/draw ortho). Any ideas on why I would be experiencing this behavior?  ;  Could it be that the Z coordinates are wrong? Well I know it''s not likely you made this kind of mistakes but... just in case. If it''s not this mistake, then I might end up runnin'' into the same kind of problem also. Anyone can help on this?  ;quote:Original post by drewslater  I have been trying to do this for a while and I have the problem that all the stuff I draw in ortho mode is drawn "behind" the stuff I have drawn in perspective mode. I am doing it as stated above (set perspective/draw perspective/set ortho/draw ortho). Any ideas on why I would be experiencing this behavior? If your Ortho mode stuff is something like a HUD that should always be in front (and it''s rare that it wouldn''t be)  you can turn off the Z-Buffer. With no z-reads/writes you might get a small performance boost too.BeginSceneSetPersepectiveEnableZBufferDrawPerspectiveStuffSetOrthoDisableZBufferDrawOrthoStuffEndScene Stay Casual,KenDrunken Hyena