   Direct3D support
  I have an application I'm developing which primarily uses Direct3D for rendering. In order to provide for as wide an audience as possible, the application also has a fallback to GDI since currently the graphics are all 2D. However, this is proving to be very limiting in what I can achieve. An effect that can be achieved with a simple HLSL shader can be extremely difficult to mimic in old technologies, and progressing to 3D, fully hardware accelerated graphics is a no-no. Ideally, I want to break free of this and focus entirely on using Direct3D for graphics. What I need to know beforehand is how much I can limit the loss in compatibility. For example;- How widely supported is Direct3D (9) in hardware from, say, the last ten years. Presumably all standard desktop PCs produced these days will support it to some degree, regardless of whether they have integrated or dedicated graphics? What about vertex and pixel shader support - how widely adopted is this?- Is there any kind of usable software-based rendering for Direct3D that I could use as a fallback? I'm aware of the reference rasterizer, but this seems to be designed as a development and testing tool rather than a solution for non-supported hardware.- Is OpenGL more widely supported? I don't particularly want to go down this route but I'll consider it if need be. Any help with my questions, or any other relevant information would be greatly appreciated. Thanks in advance.[Edited by - Barguast on April 21, 2010 5:41:50 PM]
  How wide of an audience are you targeting, it sounds like you're trying for everyone accept perhaps server machines.I'm assuming that you chose DX9 because you're trying to reach XP machines, right?Though it is biased towards gamers, valve's steam hardware survey can provide some information on the hardware support for different features and API level's.If you target vista/win7 then you can use the WARP software device as a fall back to rendering.If you drop XP, then you can use the feature levels in d3d11 to target dx9, dx10, and dx11 hardware, and WARP.Though dx9 support may be fairly prevalent, not all hardware is created equal.  There are hardware parts that emulate vertex shaders on the CPU, or may have speed issues compared to other chip makers.  This might not be a problem if your application isn't very graphics intensive to start with.The REF device is to assist with hardware implementation and to figure out if bugs are driver issues or developer issues.  It is extremely slow.   ;  I have an application I'm developing which primarily uses Direct3D for rendering. In order to provide for as wide an audience as possible, the application also has a fallback to GDI since currently the graphics are all 2D. [Standby01] I am so confused. If you need a fallback for D3D, then DirectDraw is obviously better than GDI. Before Direct3D 9, actually DirectDraw was served as the engine of Direct3D. However I don't think you need this kind of "fallback". Direct3D 9 compatible adapters are being used on almost all of computers around world I believe. - How widely supported is Direct3D (9) in hardware from, say, the last ten years. Presumably all standard desktop PCs produced these days will support it to some degree, regardless of whether they have integrated or dedicated graphics?[Standby01] Answered above.- Is there any kind of usable software-based rendering for Direct3D that I could use as a fallback? I'm aware of the reference rasterizer, but this seems to be designed as a development and testing tool rather than a solution for non-supported hardware. [Standby01] Microsoft provids a public available Software Rasterizer(GPU, Adapter) called WARP - Windows Advanced Rasterization Platform, in Windows 7    http://msdn.microsoft.com/en-us/library/dd285359.aspxIt only supports D3D10.0 10.1 as well as D3D11 on feature levels 9.1, 9.2, 9.3 10.0 and 10.1. Personally I strongly encourage you to use DirectX SDK   1) It is free   2) It is better, especially D3D11 some important improvements on visual effects and performance e.g Tesselation, Compute Shader and Multi-threaded Rendering.Here are two D3D11 benchmark videos[Edited by - standby01 on April 21, 2010 6:29:37 PM];  Check out the Steam Hardware Survey for an idea of what hardware PC gamers are using, or you can check out the Unity Web Player Hardware Statistics for a much more generalized population (casual PC users, etc.).   ;  Direct3D 9 as an API should be available to all windows users. In terms of hardware, if you really want compatibility as far back as possible, I'd suggest you use the fixed function pipeline instead of dropping to GDI. Still, targetting shader model 2 should be pretty safe these days.There are two software D3D9 libraries I'm aware of, SwiftShader and Pixomatic, but both are commercial.   ;  Thanks for all of your replies.Quote:Original post by ET3DDirect3D 9 as an API should be available to all windows users.By all Windows versions, I assume you mean all 'recent' desktop versions of Windows (by which I mean Windows XP, Vista, and 7, but not any of the Server editions). Hopefully that will be enough. I'm going to audit the hardware and see what the results are. I am hoping to target Direct3D 9 (to support XP) with VS/PS version 2.0.@ standby01 - DirectDraw is deprecated, and doesn't support 3D. Those are the same reasons I don't want to use GDI+. Well, technically, it's not deprecated but since it doesn't support hardware acceleration (and it seems MS have no plans to add it) it might as well be.Thanks again.   ;  Is this a fair assessment?Direct3D 9: Can be used with Windows XP, Vista, and 7. Full support is provided only in hardware, and in the reference rasterizer (but this is too slow for any real applications). Partial support is provided with the pluggable software rasterizer, but this is limited to the fixed function pipeline only (no vertex or pixel shaders). Direct3D 11 : Can be used with Windows Vista and 7 but not XP. Full support is provided in hardware, and in software using WARP10. WARP10 which is faster than a D3D9 reference rasterizer and suitable for non-demanding 3D applications. Direct3D 11 is compatible with Direct3D 9 hardware when using the appropriate compatibility settings.   ;Quote:Original post by BarguastIs this a fair assessment?Direct3D 9: Can be used with Windows XP, Vista, and 7. Full support is provided only in hardware, and in the reference rasterizer (but this is too slow for any real applications). Partial support is provided with the pluggable software rasterizer, but this is limited to the fixed function pipeline only (no vertex or pixel shaders). Direct3D 11 : Can be used with Windows Vista and 7 but not XP. Full support is provided in hardware, and in software using WARP10. WARP10 which is faster than a D3D9 reference rasterizer and suitable for non-demanding 3D applications. Direct3D 11 is compatible with Direct3D 9 hardware when using the appropriate compatibility settings.Exactly   ;  The op main concern is to provide for as wide an audience as possible. With that said, mention of DX10 and DX11 is irrelevant since (1) They both require at least Windows Vista which we all now doesn't have much of a market share as Windows XP. (2) DX10 requires at least a NVidia 8 series card and I don't know which ATI card and the DX11 cards are just entering the market.   Since most of graphics are 2d you could even go back as far as a DX7 card and use DirectDraw(fix function). However if you require the flexibility of shader, then an entry DX9 card should be a sufficient requirement (minimum Geforce 5 series). Even integrated graphics card today have DX9 support minimum. For your use case I don't think there should be a need for a fallback since you are not really doing a full blown 3D game. Whatever is not available via a the programmable pipeline can me emulated/replicated with the fix function pipeline.  As far as OpenGL goes its pretty much the same whichever API you choose. Most DX9 based cards will have support for a limited set of OpenGL 2.0 features and those should be sufficient for your needs also.   Hopefully that helps.