Public Member Functions
GraphicDriver Class Reference

Detailed Description

The GraphicDriver class encapsulates the graphic driver currently set for drawing hardware shaders.

See also:
9.0 (2011)

#include <xsi_graphicdriver.h>

Inheritance diagram for GraphicDriver:
Inheritance graph

List of all members.

Public Member Functions

  GraphicDriver ()
  ~GraphicDriver ()
  GraphicDriver (const CRef &in_ref)
  GraphicDriver (const GraphicDriver &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
GraphicDriver operator= (const GraphicDriver &in_obj)
GraphicDriver operator= (const CRef &in_ref)
siGraphicDriver  GetGraphicDriverType ()
void *  GetHardwareInterface ()
CStatus  AddDriverResource (void *in_pRes)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

GraphicDriver ( const CRef in_ref )


in_ref constant reference object.
GraphicDriver ( const GraphicDriver in_obj )

Copy constructor.

in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

in_ClassID class type.
true if the class is compatible, false otherwise.

Reimplemented from SIObject.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

The class type.

Reimplemented from SIObject.

GraphicDriver& operator= ( const GraphicDriver in_obj )

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

in_obj constant class object.
The new GraphicDriver object.
GraphicDriver& operator= ( const CRef in_ref )

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

in_ref constant class object.
The new GraphicDriver object.

Reimplemented from SIObject.

siGraphicDriver GetGraphicDriverType ( )

Returns a siGraphicDriver enum indicating the type of graphic driver.

The graphic driver type.
void* GetHardwareInterface ( )

Returns a void* which represents the interface to the underlying Graphics API. for OpenGL, this simple returns a HGLRC. For DirectX based divers, you get an IUnknown which can be used to retrieved the DirectX device.

Pointer to the hardware graphic interface.
CStatus AddDriverResource ( void *  in_pRes )

Adds a resource to the driver. The implementation and meaning of this method differs from driver to driver. For DirectX9, the parameter is a pointer to an IUnknown. You should use this function when you create a resource that is not automatically managed by the DirectX driver and that needs to be manually restored when the DirectX device is reset. For example, if you create a HLSL shader (ID3DXEffect) in your plugin, you must pass the IUnknown pointer of this effect using AddDriverResource. The driver will then take care of managing the states when the device is released.

Pointer to a resource for a given graphic API type.
CStatus::OK for success

The documentation for this class was generated from the following file: