14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!
ID3DXSprite::Draw has a D3DCOLOR parameter and the default texture stage states are set for modulation, so you could use a 1x1 white texture and set this color appropriately for untextured drawing.
Thank you for this hint - I didn't realize I can do that. Starting with a white texture is really a cool trick.
Now I'm using a white "blueprint" texture for primitive drawing, then add color via the "sprite.Draw" method. This makes life a lot easier indeed, because I don't need to create and manage multiple textures for the purpose of primitive drawing.
If anyone else has other / better ideas, I would be glad to read about it.
Are you strictly limiting yourself to 2d? I ended up just drawing everything 2d as primitives in my engine I did and subverted LPD3DXSPRITE all together.
The graphics of my game are 2D, which means everything is drawn flat and there is no depth. I wouldn't mind using 3D functions for programming however, if they are suitable for my needs.
The problem I currenty have with 3D functions is that I couldn't find a way to render images. How did you handle that in your engine? Image I have an image of a red dragon, stored in a png file on disk - how can I print that to the screen?