2D graphics in DX8
by William Finlayson · in Technical Issues · 03/01/2001 (12:23 pm) · 6 replies
I was going to make a 2D graphics engine in DX8, either for use in a game of for use as a menu system in a 3D engine, but there don't seem to be any 2D graphics routines in DX8. The help manual sugests to use 3D surfaces, basically using 3D but in a way that looks 2D, but won't that be a lot slower then just working in 2D? Also, that would mean that you would need a 3D accelerator to play a 2D game at good speed. I was thinking maybe to do 2D graphics, instead of using 3D, I could just write some 2D routines myself, locking the back buffer and drawing directly to it, do that 3D harware isn't needed. I'm not sure what the speed difference would be.
Should I make options for both, so that if you have 3D hardware do it using accelerated 3D methods, or if not then just use the software 2D routines? I'm just curious if anyone knows whether drawing using 3D methods with an accelerator would be faster then software 2D operations, becouse in that case there would be no point in adding support for acceleration.
Should I make options for both, so that if you have 3D hardware do it using accelerated 3D methods, or if not then just use the software 2D routines? I'm just curious if anyone knows whether drawing using 3D methods with an accelerator would be faster then software 2D operations, becouse in that case there would be no point in adding support for acceleration.
About the author
#2
03/02/2001 (9:22 am)
Actually in DX8 they merged DirectDraw and Direct3D into DirectGraphics. I have heard of a lot of people having problems getting decent 2D performance out of DX8. There is that Sprite demo in the SDK that might help but I haven't looked in the source to see what it is doing. I read somewhere that there is talk of DX9 having DirectDraw back.
#3
I should have realized though that I can still just use ddraw from dx7 because it's all backwards compatible because of the COM spec, doh!
03/02/2001 (11:54 am)
I've found out some more about it now, 2D graphics using direct graphics is just using textured polygons to look 2D. I should have realized though that I can still just use ddraw from dx7 because it's all backwards compatible because of the COM spec, doh!
#4
3D surfaces as 2D surfaces was a certain amount of distortion in the images. I found fonts looked
blurred. It just didn't look good at all. So I went
back to DX 7's Direct Draw.
05/19/2001 (7:06 am)
One thing I wasn't able to get past when trying to use3D surfaces as 2D surfaces was a certain amount of distortion in the images. I found fonts looked
blurred. It just didn't look good at all. So I went
back to DX 7's Direct Draw.
#5
05/19/2001 (7:10 am)
The blury is most likly result of texture filtering, it can be solved by either disable it (use nearest filtering) or do a texel to pixel exact mapping.
#6
07/27/2001 (2:20 pm)
wow this sounds fun.. wish I could use Dx
Andrew Chapman
I'm pretty sure DX8 will still have the DirectDraw stuff, if only for backwards compatability. Don't hold me to this, I'm still using DX7.