Archived

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

I want to create status bar (2d) in d3d

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

Hi, Now,I finished build 3d models and I also render them to my game. Then, I want to create status bar that representing model''s HealthPoint. You know?The HealthPoint Bar must show me in the same place,when I change camera point. I think it must be use 2d surface. I''ve read "GameDev_net - 2D Rendering in DirectX 8" Tutorial. But it be use in 2d graphic only ,or not??. So ,Could anyone tell me how to make 2d surface in finished 3d world? I want 2d surface showing,and 3d world behind 2d surface showing too.

Share this post


Link to post
Share on other sites
just only set Projection?

in render loop:
{
d3ddevice->settransform(D3DTS_PROJECTION,&Ortho2d);
Draw2d();

d3ddevice->settransform(D3DTS_PROJECTION,&Perspective);
Draw3d();
}

Only this?

Ok, I will try.
Thank you for your fast reply.

Share this post


Link to post
Share on other sites
I use transformed vertices. Try looking at the 3dFont sample included with the SDK. They use tranformed and lit vertices for drawing 2d text on the screen using screen coordinates. This is, in my opinion, the easiest and most intuitive way of drawing 2d such as menus, status bars, or any kind of GUI. HTH.

Share this post


Link to post
Share on other sites