#include <DeviceContextC.h>
The purpose of the device context class is to gather all the device interfaces available to the effects. The interfaces may range from renderin APIs (such as OpenGL, or Direct3D) to music system APIs. The interface holds just enough information to use the API and some helper methods to help the use of the API under the editor. Device context simply holds these interfaces. These interfaces can be queried from the context.
This class is implemented by the system.
|
Default constructor. Initialises the structures used by the device context. Used internally. |
|
Default destructor. The destructor. Releases all resgitered interfaces. Used internally. |
|
Query specified device interface.
The IDs for the interfaces are defined in the header files of the interfaces. Example: void TestEffectC::do_frame( DeviceContextC* pContext ) { OpenGLInterfaceC* pInterface = (OpenGLInterfaceC*)pContext->query_interface( INTERFACE_OPENGL ); if( !pInterface ) { // No interface available... bail out! return; } // do the effect... } |
|
Register device interface. The system uses this method internally to register device interfaces to the device context. |