Question about RTS panel

Started by
4 comments, last by budipro 20 years, 8 months ago
Hi all, I want to visualize a control panel just like on most RTS games. (which usually on the bottom of the screen). What are the steps I should take (any technique or methods)? Thanks a lot.
Advertisement
You might want to look into screen-space vertices or orthogonal projection matrices (to draw the panel on the screen), and stencil buffers (so you don''t draw the 3d scene over or under the panel).

ToohrVyk

Thanks for your answer, ToohrVyk.

Sorry for not making my question clear. I need the explanation from the very beginning. Starting with what is exactly the control panel made of? Is it a textured quad? Is it rendered on different viewport? Then after I create the control panel based on the answers of these questions, I will begin to think how to put the panel on the screen.

Thanks again.
It''s one or more quads that are rendered to the screen. Usually, you want to do these with device-space coordinates or orthogonal projection, so you can accurately place them, and so they don''t move when the in game camera moves.

Once they are rendered, you may want to avoid drawing the terrain over them, so use a stencil buffer or write very very close values to the z-buffer for pixels that should not be drawn over.
Thanks ToohrVyk.

Sorry, I''m still a newbie in game programming. Right now I''m using Direct3D.

What is device-space coordinates? Is it screen coordinates (x,y)?

quote:Original post by ToohrVyk
Once they are rendered, you may want to avoid drawing the terrain over them, so use a stencil buffer or write very very close values to the z-buffer for pixels that should not be drawn over.


Depending on what you''re drawing, and the order in which you''re doing it, you can either turn off depth testing (and order things correctly yourself), or clear the depth buffer first (nice if you need a per-pixel depth test, but slightly slower due to the clear operation) and use regular depth writing and testing.

This topic is closed to new replies.

Advertisement