Jump to content
  • Advertisement

Archived

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

Drythe

orienting hud

This topic is 5486 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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!