Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

idx14

2D (Movable) Hud in DX8

This topic is 5958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Heya All, I''ve created an app with nice HUD interface (y''know, buttons and stuff) but the buttons start cluttering the window. What I want to do is create toolbars that "hide" at the side of the screen and when the Mouse Cursor moves over the "hidden toolbar" i want it to slide out from the side of the screen...Anyone? I have thought of some solutions for these problems, but i''m not sure about the performance degradation it will cause. For Example: I can take all my Hud Elements and lock their vertex buffers, update vertex positions, unlock and render. Or Maybe: Render the whole shebang to a surface and only update the plane (as mentioned above) with the mentioned surface as a texture. Any ideas here? -idx

Share this post


Link to post
Share on other sites
Advertisement
Why don''t you simply modify the transform matrix associated with your geometry?

Share this post


Link to post
Share on other sites
Can you use a translation matrix with the view in orthagonal mode to translate the vertex buffers anywhere you want?

Share this post


Link to post
Share on other sites
You could try DrawPrimitiveUP. It lets you render without a vertex buffer, the UP stands for user pointer. I don''t know if its any slower.

Proceeding on a brutal rampage is the obvious choice.

Share this post


Link to post
Share on other sites
This has been discussed many times - UP is slower.

For small numbers of vertices on newer cards, locking T&L vertices "costs" roughly the same as using the matrices.

Personally, I prefer the matrix approach, but the relative cost may be different on older cards. The best idea would be to experiment and see the results.

Share this post


Link to post
Share on other sites
Are you using straight forward surfaces to draw your HUDs to the screen, why not use the D3DXSprite interface to just draw them onto the screen and use clipping function to mess with the dest and src rectangles so that you can draw off screen and still see parts of the surface

Share this post


Link to post
Share on other sites
Hey guys, thanx for all yer replies, but i forgot to mention that the vertices I use are transformed & lit vertices, thus no transformation operations work! .
MatthewEva: I think I will settle for your idea...But any more notes on the Transformed&Lit Vertices are welcome! PLease?

Chow
-idx

to code or not to code, that is the algorithm

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!