2D (Movable) Hud in DX8
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
Can you use a translation matrix with the view in orthagonal mode to translate the vertex buffers anywhere you want?
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.
Proceeding on a brutal rampage is the obvious choice.
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.
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.
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement