D3DXSPRITE_BILLBOARD Confused with requirements

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am attempting to use the ID3DXSPRITE auto-billboard feature (D3DXSPRITE_BILLBOARD as a parameter of LPD3DXSPRITE::Begin()).
I am calling SetWorldViewLH() and passing my cameras world and view matrices. I am also calling begin with these flags:
D3DXSPRITE_BILLBOARD
D3DXSPRITE_OBJECTSPACE
I havent changed anything about my texture loading as I havent found any mention of that in the documentation.
The problem at this point is that I only get at best 1/4 of my screen to even react to the sprites, and only in solid colors. The color sprite is pasted to the cameras view in the same way a normal sprite is.
I know it is not a problem with the sprites because if I use them in default behavior they work. I know the 3d scene is being done right because I can see it working behind what should be the sprites. So that just leaves my stuff. In the draw the center
and position are both (0,0,0) vectors which I thought would give me my textures centered on their top left corner in the origin of the world.
I am using June2010 DirectX 9.

UPDATE: If I calculate the center and pass that as pCenter to Draw() the texture fills the screen but is still a complete color.

View the full article
 
Back
Top