GL Studio C++ Runtime API
GlsRenderEffect Class Referenceabstract

#include <gls_render_effect.h>

Inheritance diagram for GlsRenderEffect:
VertexAttribIndexLookup Effect_DiffNormSpecRefl Effect_DirectXShader

Classes

class  TextureSettings
 

Public Member Functions

virtual void AddRef ()=0
 
virtual void SetupEffect (DynamicArray< Material > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3, unsigned int maxLightNum, unsigned int activeLightMask)=0
 
virtual void CleanupEffect ()=0
 Remove the effect trom the OpenGL state.
 
virtual int Compare (const GlsRenderEffect *other) const =0
 
bool Equals (const GlsRenderEffect *other) const
 
virtual GlsRenderEffectClone () const =0
 
virtual void GetReferencedMaterials (ReferencedMaterialArray &referencedMaterials)
 
virtual void GetReferencedTextures (ReferencedTextureArray &referencedTextures)
 
- Public Member Functions inherited from VertexAttribIndexLookup
virtual GLint GetVertexAttribIndexForSemantic (int semanticEnum)=0
 

Detailed Description

Abstract render effect class Encapsulates an effect that can be applied to the OpenGL state to modify the appearance of geometry. This API currently only supports single pass techniques.

Member Function Documentation

virtual void AddRef ( )
pure virtual

Manage references to the effect

Implemented in Effect_DiffNormSpecRefl, and Effect_DirectXShader.

virtual GlsRenderEffect* Clone ( ) const
pure virtual

Returns a new instance of the effect with the same settings as this one

Implemented in Effect_DiffNormSpecRefl, and Effect_DirectXShader.

virtual int Compare ( const GlsRenderEffect other) const
pure virtual

Returns 0 if the effects are equal, a positive number if this effect should sort after the other effect, and a negative number if this effect should sort before the other effect. The rendering system uses this to sort effects.

Implemented in Effect_DiffNormSpecRefl, and Effect_DirectXShader.

bool Equals ( const GlsRenderEffect other) const
inline

Determine if two GlsRenderEffect instances are equivalent The rendering system uses this to eliminate redundant effects.

virtual void GetReferencedMaterials ( ReferencedMaterialArray referencedMaterials)
inlinevirtual

Checks whether or not the effect is transparent. Implementing is optional Inserts all referenced textures into the array passed in. Implementing is optional

Reimplemented in Effect_DiffNormSpecRefl.

virtual void GetReferencedTextures ( ReferencedTextureArray referencedTextures)
inlinevirtual

Inserts all referenced textures into the array passed in. Implementing is optional

Reimplemented in Effect_DiffNormSpecRefl.

virtual void SetupEffect ( DynamicArray< Material > &  materialPalette,
TexturePalette texturePalette,
const TextureSettings textureSettings,
float *  viewToWorld3x3,
unsigned int  maxLightNum,
unsigned int  activeLightMask 
)
pure virtual

Apply the effect to the OpenGL state

Parameters
materialPaletteUsed to access material settings
texturePaletteUsed to access texture maps
textureSettingsThe object-level texture settings
viewToWorld3x3A 3x3 matrix containing the current viewToWorld transfrom. Used for environment mapping effects.
maxLightNumThe number of active lights in the scene. Used to speed up light calculations.
activeLightMaskA bit mask of which lights are active in the scene (Ex. GL_LIGHT0, GL_LIGHT2, GL_LIGHT3 and GL_LIGHT7 are active: activeLightMask = ...10001101 last 8 bits in binary = 141u)

Implemented in Effect_DiffNormSpecRefl.


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