XNA Creators Club Online
Page 1 of 1 (8 items)
Sort Posts: Previous Next

DirectX Software rendering problem

Last post 1/16/2008 1:22 AM by UUS831. 7 replies.
  • 1/14/2008 3:27 AM

    DirectX Software rendering problem

    Hi, my program uses hardware acceleration in DirectX and when it is run on computers without dedicated graphics card, it fails to run. I then changed to software acceleration, and yet it still fails to run. I have installed DirectX 9 Redist Nov 07 on the target computer. I have debugged the code and found out that the program now depends on d3dref9.dll (Direct3D reference rasterizer?).

    d3dref9.dll is not included in the DirectX 9 Redist. The program runs fine on the target computer if i manually copy the file over. How can i distribute this file? It is allowed? Why is my program now depends on the reference rasterizer? What is the right way to develop directx program with software acceleration support?

    Thanks.
  • 1/14/2008 7:12 AM In reply to

    Re: DirectX Software rendering problem

    The reference rasterizer (yes, d3dref9.dll) is only for debugging purpose. Therefore it is not allowed to distribute it alone.  Direct3D 9 doesn’t support rendering without hardware out of the box. The solution for this problem depends on the feature set you need.

  • 1/14/2008 8:21 AM In reply to

    Re: DirectX Software rendering problem

    As an adition on what Demirug said, the reference rasterizer is used to emulate hardware rendering, so it is way much slower than the hardware rasterizer. If your target PC don't have a dedicated video card, there's no point in using DirectX at all.

    Use it only for debuging purposes - never for production / finished game or application.

  • 1/14/2008 11:44 PM In reply to

    Re: DirectX Software rendering problem

    I'm using DirectX because my program draws a simple 3D scene. I want to use software renderer so that my program is capable of "fall-back" to software if hardware is not found. If there is no software renderer in DirectX redist, how come programs such as Sketchup, and 3dsMax etc that do run on computers without dedicated graphics card? They dont use DirectX? Or they use OpenGL? If so, it means OpenGL has software renderer, and DirectX doesnt?

    I need the ability to use hardware and fall-back to software if not available. Speed is not the issue. How to do that the correct way in DirectX?
  • 1/15/2008 8:34 AM In reply to

    Re: DirectX Software rendering problem

    Answer
    Reply Quote

    With Directx you can have two types of Graphic Devices: HAL and Reference; and you can have two types of Vertex Processing: Hardware and Software.

    See this article to check what all those are, what they do and when to use them. Hope that helps. The Reference Device is provided as a debug tool and any machine using an application or game that use that Device type must have installed the Directx SDK or at least the Debug version of Directx (provided with the SDK).

     

    http://msdn2.microsoft.com/en-us/library/bb219625.aspx

     

    Edit: for the scenario you are describing, you may want to create a HAL Devive and Software Vertex processing as a fall-back option (Hardware Verxtex processing should be your default).

  • 1/15/2008 12:04 PM In reply to

    Re: DirectX Software rendering problem

    Answer
    Reply Quote

    There are three options to get Direct3D running without any Direct3D hardware at all:

    Software Rasterizer for the Microsoft DirectX 9.0

    pixomatic

    SwiftShader

     

  • 1/15/2008 9:38 PM In reply to

    Re: DirectX Software rendering problem

    Some more info about the topic. Really don't know if you are using VC++ or C#, but the concepts behind are the same for both.

    Take a look at this thread, it's very interesting and may help.

    http://forums.xna.com/thread/38592.aspx

  • 1/16/2008 1:22 AM In reply to

    Re: DirectX Software rendering problem

    Thanks everyone. I understand now. For the time being, i guess i have to use d3dref9.dll with the SDK.
Page 1 of 1 (8 items) Previous Next