I'm looking for some help in drawing a texture (or anything really) that is fixed to the screen. Like text in the sdk samples, you can move around in 3d but the text is fixed.
My goal is to create a heads up display for a 3d fps.
I just started learning direcx 9 abt 2.5 weeks ago but have the basics down - except this. If anyone could point me to a sample it would be great.
Thanks in advance
oh btw i'm using c++

2d display in direct3d
JoelSSIS
Thanks, I wasn't sure that sprites, particularly that c# sample would work. I've seen people using quads in 3d and setting the projection to orthonormal to create this effect. But that sample looks alot simpler.
Time to put on my c# hat on :)
greg_burns
This can easily be done, what you need to do is have a look at the sprite classes. I have not done this is C++ as my language of choice is c#. With c# I would be directing you to have a look at the 2d sample that is included in the SDK and you should be able to incorporate it into a 3d Application.
Remember that the controls in the sample framework that you talk about are just basic sprites.
ihsanakin
There is a good reason for this - it allows you to apply a vertex shader to the 2D geometry.
If you were to roll your own sprite class you'd probably specify D3DFVF_XYZRHW and/or a float4 position with the POSITIONT semantic; both of which will skip the vertex processing segment of the pipeline.
The ID3DXSprite interface is by far the quickest/simplest way of getting 2D graphics up-and-running, but if you're going to be making heavy use of 2D then I'd suggest rolling your own. You can perform a number of optimizations and have a lot more flexibility that way.
It's getting a little dated now, but this article covers much of the basics behind rolling your own sprite implementation in D3D9/C++.
hth
Jack