Jump to content
  • Advertisement

Archived

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

Drythe

orienting hud

This topic is 5573 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

I''m rendering a hud with a quad and was wondering if there was a simple way to orient it towards the camera and on a fixed part of the screen (without vector/matrix stuff). thx!

Share this post


Link to post
Share on other sites
Advertisement
Just disable depth testing and reset the matrices to identity.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
you can always use the transformed vertex format.

struct TLVertex
{
FLOAT x, y, z, rhw;
D3DCOLOR specular, diffuse;
FLOAT tu, tv;
};

#define (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1)

Use this vertex format to render the quad in 2-d space

Share this post


Link to post
Share on other sites
Take a look at the sprite class. I carve all of my hud components out of a single bitmap and make them sprites so you can use the screen coordinates to position them. You can modify the alpha channel of the bitmap to make them see-through.

Hope it helps,
Pinz.

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!