Is there anything about dx10 that would be useful in 2D?

Started by
3 comments, last by Tom 14 years, 10 months ago
Sorry for the horrible question, but I've never messed with directx 10 yet, and I prefer working with 2D. So I'm wondering from those of you familiar with the new features in dx10 is there anything that could be beneficial in a 2D environment?
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.
Advertisement
Actually, yes!

-Geometry shader could be used to implement pixel-space rectangle drawing very easily - you could feed actual RECT structures to the GPU and have it expand them to two triangles each.

-Fill rate is usually very high on D3D10 cards and later - this enables very high amounts of alpha-blended "sprites".

-Blending is expanded so that you can now use two different blending operations at the same time. This enables advanced effects like fire+smoke more easily than in D3D9.

-Draw call overhead is lower than in D3D9. This means that lack of renderstate batching optimization doesn't become a bottleneck nearly as early as in D3D9.

-Texture arrays enable you to efficiently draw multiple sprites with different image, in just one call. This eases batching and lowers CPU usage.

These are just off top of my head. There are no doubt more benefits than these. In general, D3D10 API performance is much better than in D3D9, partly due to optimized internal and external infrastructure, and partly to lower call overhead. State management does differ a bit from D3D9, but this is a trivial cost for the benefits.

Niko Suni

Hello Freeworld,
Direct X 11 provides an new technology called Direct2d
http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx
Or do you want to use Direct X 10 yet ?
I would definitely look into Direct2D, or failing that go straight to Direct3D 11 - don't go with 10.0, 10.1 if you absolutely must.

11 and 10.1 have all the advantages of 10.0 but also have numerous hardware targets - Software, D3D9-SM2+, D3D10.x and D3D11. The only downside is that you can only target Vista and Win7, but if you're considering 10.0 then I suspect thats not such a big problem [smile]


hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Direct2D relies on Direct3D for drawing but is separate from DirectX and is available under Vista and Windows 7. It's a fairly powerful, hardware-capable replacement for GDI+. Using bitmaps requires going through another API, such as DirectX, WIC, or possibly GDI+ if you use a shared render target — it has no methods for loading bitmaps directly.

I've been playing around with it lately, and performance is very good. You also get access to DirectWrite, the font/text component, which is considerably more versatile than D3DXFont. The lack of immediate support for loading images is what turns me off, but the geometry, brush, and text features are very nice. It's perfect for high-performance vector graphics.

GDNet+. It's only $5 a month. You know you want it.

This topic is closed to new replies.

Advertisement