Public Member Functions | |
bool | IsSupported () const |
Returns true if this renderer is supported on this system (e.g. More... | |
bool | DoesSupportCompressedSHL () const |
Returns true if this renderer supports SHL rendering with compressed (indexed) SHLMaps, false otherwise. More... | |
bool | DoesSupportUncompressedSHL () const |
Returns true if this renderer supports SHL rendering with uncompressed SHLMaps (four coefficients per SHLMap), false otherwise. More... | |
int | GetPreferenceNr () const |
Returns a "global" preference number for this renderer. More... | |
void | Initialize () |
Call this after a successful call to IsSupported() in order to prepare the renderer for use. More... | |
void | Release () |
Call this in order to release this renderer. More... | |
const char * | GetDescription () const |
Returns a description of this renderer, e.g. More... | |
MatSys::RenderMaterialT * | RegisterMaterial (const MaterialT *Material) const |
Registers the Material with the renderer, and returns a handle for future reference. More... | |
const MaterialT * | GetMaterialFromRM (MatSys::RenderMaterialT *RenderMaterial) const |
Returns the MaterialT object that was used in RegisterMaterial() to create the RenderMaterial. More... | |
unsigned long | GetAmbientShaderIDFromRM (MatSys::RenderMaterialT *RenderMaterial) const |
Returns the ID of the ambient shader of the RenderMaterial. More... | |
unsigned long | GetLightShaderIDFromRM (MatSys::RenderMaterialT *RenderMaterial) const |
Returns the ID of the light shader of the RenderMaterial. More... | |
void | FreeMaterial (MatSys::RenderMaterialT *RenderMaterial) |
Used to free the previously registered (render-)material. More... | |
void | BeginFrame (double Time) |
Call this to begin rendering a new frame. More... | |
void | EndFrame () |
Call this to end the current frame. More... | |
void | PreCache () |
This function pre-caches all textures of all materials that have been registered with RegisterMaterial() so far. More... | |
void | SetCurrentRenderAction (RenderActionT RA) |
This activates a specific render action, as is required for multi-pass rendering with dynamic lights and stencil shadows. More... | |
RenderActionT | GetCurrentRenderAction () const |
Returns the currently set render action. More... | |
void | SetGenPurposeRenderingParam (unsigned long Index, float Value) |
void | SetGenPurposeRenderingParam (unsigned long Index, int Value) |
float | GetGenPurposeRenderingParamF (unsigned long Index) const |
int | GetGenPurposeRenderingParamI (unsigned long Index) const |
void | SetCurrentAmbientLightColor (float r, float g, float b) |
float * | GetCurrentAmbientLightColor () |
const float * | GetCurrentAmbientLightColor () const |
void | SetCurrentLightSourcePosition (float x, float y, float z) |
float * | GetCurrentLightSourcePosition () |
const float * | GetCurrentLightSourcePosition () const |
void | SetCurrentLightSourceRadius (float r) |
float & | GetCurrentLightSourceRadius () |
const float & | GetCurrentLightSourceRadius () const |
void | SetCurrentLightSourceDiffuseColor (float r, float g, float b) |
float * | GetCurrentLightSourceDiffuseColor () |
const float * | GetCurrentLightSourceDiffuseColor () const |
void | SetCurrentLightSourceSpecularColor (float r, float g, float b) |
float * | GetCurrentLightSourceSpecularColor () |
const float * | GetCurrentLightSourceSpecularColor () const |
void | SetCurrentEyePosition (float x, float y, float z) |
float * | GetCurrentEyePosition () |
const float * | GetCurrentEyePosition () const |
void | PushLightingParameters () |
Pushes all lighting parameters onto a stack. More... | |
void | PopLightingParameters () |
Pops (restores) the lighting parameters that have previously been pushed onto the stack. More... | |
void | ClearColor (float r, float g, float b, float a) |
void | Flush () |
const MatrixT & | GetMatrix (MatrixNameT MN) const |
const MatrixT & | GetMatrixInv (MatrixNameT MN) const |
const MatrixT & | GetMatrixModelView () const |
void | SetMatrix (MatrixNameT MN, const MatrixT &Matrix) |
void | Translate (MatrixNameT MN, float x, float y, float z) |
void | Scale (MatrixNameT MN, float scale) |
void | RotateX (MatrixNameT MN, float angle) |
void | RotateY (MatrixNameT MN, float angle) |
void | RotateZ (MatrixNameT MN, float angle) |
void | PushMatrix (MatrixNameT MN) |
void | PopMatrix (MatrixNameT MN) |
void | SetViewport (int x, int y, int width, int height) |
void | GetViewport (int viewport[4]) |
void | SetSelectionBuffer (unsigned long Size, unsigned int *Buffer) |
unsigned long | SetPickingRenderMode (PickingRenderModeT PRM) |
void | InitNameStack () |
void | LoadName (unsigned long Name) |
void | PushName (unsigned long Name) |
void | PopName () |
void | SetCurrentMaterial (MatSys::RenderMaterialT *RenderMaterial) |
MatSys::RenderMaterialT * | GetCurrentMaterial () const |
void | LockCurrentMaterial (bool LockCM) |
void | SetCurrentLightMap (MatSys::TextureMapI *LightMap) |
void | SetCurrentLightDirMap (MatSys::TextureMapI *LightDirMap) |
void | SetCurrentSHLMaps (const ArrayT< MatSys::TextureMapI * > &SHLMaps) |
void | SetCurrentSHLLookupMap (MatSys::TextureMapI *SHLLookupMap) |
void | RenderMesh (const MatSys::MeshT &Mesh) |
MatSys::RenderMaterialT * | GetCurrentRenderMaterial () const |
TextureMap2DT * | GetCurrentLightMap () const |
TextureMap2DT * | GetCurrentLightDirMap () const |
TextureMap2DT * | GetCurrentSHLMap (unsigned long Index) const |
TextureMap2DT * | GetCurrentSHLLookupMap () const |
TextureMapCubeT * | GetNormalizationCubeMap () const |
TextureMap2DT * | GetHelperGrayMap () const |
TextureMap2DT * | GetHelperBlackMap () const |
TextureMap2DT * | GetHelperLightBlue001Map () const |
unsigned long | GetInitCounter () const |
CGcontext | GetCgContext () const |
const DepRelMatrixT & | GetDepRelMatrix (MatrixNameT MN) const |
const DepRelMatrixT & | GetDepRelMatrixInv (MatrixNameT MN) const |
const DepRelMatrixT & | GetDepRelMatrixModelView () const |
const ExpressionT::SymbolsT & | GetExpressionSymbols () const |
Public Member Functions inherited from MatSys::RendererI | |
virtual | ~RendererI () |
This ABC does neither have nor need a destructor, because no implementation will ever be deleted via a pointer to a RendererI. More... | |
Static Public Member Functions | |
static RendererImplT & | GetInstance () |
Additional Inherited Members | |
Public Types inherited from MatSys::RendererI | |
enum | RenderActionT { AMBIENT, STENCILSHADOW, LIGHTING } |
enum | MatrixNameT { MODEL_TO_WORLD, WORLD_TO_VIEW, PROJECTION, END_MARKER } |
enum | PickingRenderModeT { RENDER, SELECT, FEEDBACK } |
|
virtual |
Call this to begin rendering a new frame.
This function typically clears the screen and calls other implementation specific functions to start a new frame. Time is the global time in seconds at which this frame starts.
Implements MatSys::RendererI.
|
virtual |
Returns true if this renderer supports SHL rendering with compressed (indexed) SHLMaps, false otherwise.
Implements MatSys::RendererI.
|
virtual |
Returns true if this renderer supports SHL rendering with uncompressed SHLMaps (four coefficients per SHLMap), false otherwise.
Implements MatSys::RendererI.
|
virtual |
Call this to end the current frame.
This function typically calls functions like SwapBuffers() and other implementation specific functions to end a frame.
Implements MatSys::RendererI.
|
virtual |
Used to free the previously registered (render-)material.
If RenderMaterial happens to be the currently used material, SetCurrentMaterial(NULL) is automatically called before RenderMaterial is deleted.
Implements MatSys::RendererI.
|
virtual |
Returns the ID of the ambient shader of the RenderMaterial.
This number can be used by the calling code in order to adjust the draw order (for the AMBIENT render action). It is guaranteed that the returned value is reasonably small, that is, not greater than the number of shaders that are employed in this renderer.
Implements MatSys::RendererI.
|
virtual |
Returns the currently set render action.
Implements MatSys::RendererI.
|
virtual |
Returns a description of this renderer, e.g.
for informing the users about the underlying technique (OpenGL, DirectX, ...), the capabilities, or details about the implementation.
Implements MatSys::RendererI.
|
virtual |
Returns the ID of the light shader of the RenderMaterial.
This number can be used by the calling code in order to adjust the draw order (for the LIGHTING render action). It is guaranteed that the returned value is reasonably small, that is, not greater than the number of shaders that are employed in this renderer.
Implements MatSys::RendererI.
|
virtual |
Returns the MaterialT object that was used in RegisterMaterial() to create the RenderMaterial.
Implements MatSys::RendererI.
|
virtual |
Returns a "global" preference number for this renderer.
This helps the caller code the select the "best" or "most preferred" renderer among many.
Implements MatSys::RendererI.
|
virtual |
Call this after a successful call to IsSupported() in order to prepare the renderer for use.
Implements MatSys::RendererI.
|
virtual |
Returns true if this renderer is supported on this system (e.g.
required OpenGL extensions are present, version of DirectX matches, ...), and returns false otherwise. This function must not be called before the underlying video environment (i.e. the OpenGL rendering context) has been initialized. No preceeding call to Initialize() is required, and the environment is left as clean as it was found, such that no subsequent actions (i.e. calls to this function of other renderers) get into trouble.
Implements MatSys::RendererI.
|
virtual |
Pops (restores) the lighting parameters that have previously been pushed onto the stack.
Nothing happens if the stack is empty.
Implements MatSys::RendererI.
|
virtual |
This function pre-caches all textures of all materials that have been registered with RegisterMaterial() so far.
As a result, the delay that otherwise occurs when new textures are first used for rendering is minimized.
Implements MatSys::RendererI.
|
virtual |
Pushes all lighting parameters onto a stack.
The depth of the stack is only limited by available memory. The following parameters are covered: Light source position and radius, light source diffuse and specular color, and the eye position. The ambient light color is currently NOT covered.
Implements MatSys::RendererI.
|
virtual |
Registers the Material with the renderer, and returns a handle for future reference.
NULL can be passed for Material, in which case a "null" handle will be returned, which is nonetheless valid (but just won't cause any rendering output later).
Implements MatSys::RendererI.
|
virtual |
Call this in order to release this renderer.
Implements MatSys::RendererI.
|
virtual |
This activates a specific render action, as is required for multi-pass rendering with dynamic lights and stencil shadows.
Rendering geometry will only consider those parts of the materials that are relevant for their currently set action.
Implements MatSys::RendererI.