Sign in to follow this  
bartiss

2D in 3D... What's the best solution?

Recommended Posts

I'm new in 3D, but so far I learned tha basics. But the question is how to display 2D user interface? I would like to display a GUI bitmap over a 3D scene. I learned a lot about DirectDraw and made lots of programs using it, but I just can't find a method to display a bitmap without all the vertices, transformations, etc. Maybe there's a way to initialize DirectDraw with Direct3D? Or maybe there is a way in pure 3D, but I just can't see it? Please help! I don't want to use 3D buttons aligned to a viewpoint! ;) Thanks in advance!

Share this post


Link to post
Share on other sites
Just render your GUI as geometry, but use an orthogonal projection (ie, not the perspective projection you use to display most of your scene)

Share this post


Link to post
Share on other sites
Using transformed vertices is not a good idea.
D3D will not supply cliping on the transformed vertices, so you have to clip by yourself.
It is recommanded to use Orthogonal projection.

Share this post


Link to post
Share on other sites
Quote:
Original post by Luffy
Using transformed vertices is not a good idea.
D3D will not supply cliping on the transformed vertices, so you have to clip by yourself.
It is recommanded to use Orthogonal projection.


UI elements, when designed properly, should not have the need to clip geometry, as they should be inside the viewport rectangle anyway. You're right, though - if one does need the clipping, it is advisable to use other methods (unless you have the clip data "for free" from the engine).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this