The typical way to initialize the rendering system in Hieroglyph 3 is to modify the App::ConfigureEngineComponents(...) method. Here is an example of what this method should normally look like:

//--------------------------------------------------------------------------------
bool App::ConfigureEngineComponents()
{
	return( ConfigureRenderingEngineComponents( 800, 600, D3D_FEATURE_LEVEL_11_0 ) );
}
//--------------------------------------------------------------------------------

This method will try to create a hardware device with the specified feature level, and if that fails then it will default to the reference device. What isn't visible in this snippet is the silent last parameter to the function, which represents the desired driver type. That parameter has a default value for the hardware device, but it can be specified with any of the available driver type enumerations. Here is the list of available driver types:

typedef enum D3D_DRIVER_TYPE {
    D3D_DRIVER_TYPE_UNKNOWN     = 0,
    D3D_DRIVER_TYPE_HARDWARE    = ( D3D_DRIVER_TYPE_UNKNOWN + 1 ),
    D3D_DRIVER_TYPE_REFERENCE   = ( D3D_DRIVER_TYPE_HARDWARE + 1 ),
    D3D_DRIVER_TYPE_NULL        = ( D3D_DRIVER_TYPE_REFERENCE + 1 ),
    D3D_DRIVER_TYPE_SOFTWARE    = ( D3D_DRIVER_TYPE_NULL + 1 ),
    D3D_DRIVER_TYPE_WARP        = ( D3D_DRIVER_TYPE_SOFTWARE + 1 ) 
};

So if you wanted to force the driver to run in reference driver mode, you would modify the above code snippet like this:

//--------------------------------------------------------------------------------
bool App::ConfigureEngineComponents()
{
	return( ConfigureRenderingEngineComponents( 800, 600, D3D_FEATURE_LEVEL_11_0, D3D_DRIVER_TYPE_REFERENCE ) );
}
//--------------------------------------------------------------------------------

Also keep in mind that the feature level MUST be D3D_FEATURE_LEVEL_11_0 when you create a reference driver!

Last edited Aug 19, 2011 at 6:59 PM by jzink, version 1

Comments

No comments yet.