|
GL Studio C++ Runtime API
|
#include <effect_directx_shader.h>
Public Types | |
| typedef std::map< std::string, float > | FloatParamsT |
| Typedef for a map between strings and floats. | |
| typedef std::map< std::string, int > | IntParamsT |
| Typedef for a map between strings and ints. | |
| typedef std::map< std::string, GlsColor > | ColorParamsT |
| Typedef for a map between strings and Colors. | |
| typedef std::map< std::string, Vector > | VectorParamsT |
| Typedef for a map between strings and Vectors. | |
| typedef std::map< std::string, bool > | BoolParamsT |
| Typedef for a map between strings and bools. | |
Public Types inherited from GlsRenderEffect | |
| typedef bool(* | DebugModeChangeCallback) (void *user, const char *modeName, bool value) |
Public Types inherited from VertexAttribIndexLookup | |
| enum | AttributeSemanticEnum { ATTRIB_UNDEFINED = 0 , ATTRIB_POSITION = 0x80000000 , ATTRIB_NORMAL , ATTRIB_BLENDWEIGHT , ATTRIB_TANGENT , ATTRIB_BINORMAL , ATTRIB_BLENDINDICES , ATTRIB_PSIZE , ATTRIB_TEXCOORD0 , ATTRIB_TEXCOORD1 , ATTRIB_TEXCOORD2 , ATTRIB_TEXCOORD3 , ATTRIB_TEXCOORD4 , ATTRIB_TEXCOORD5 , ATTRIB_TEXCOORD6 , ATTRIB_TEXCOORD7 } |
Public Member Functions | |
| Effect_DirectXShader (const Effect_DirectXShader &) | |
| Copy constructor. | |
| const Effect_DirectXShader & | operator= (const Effect_DirectXShader &) |
| bool | operator== (const Effect_DirectXShader &) const |
| bool | operator!= (const Effect_DirectXShader &o) const |
| void | SetMaterialIndex (unsigned int materialIndex) |
| unsigned int | GetMaterialIndex () const |
| void | SelectShader () |
| DistiAttribDict & | Attributes () DISTI_METHOD_OVERRIDE |
| const std::string & | EffectTypeName () DISTI_METHOD_OVERRIDE |
| GLint | GetVertexAttribIndexForSemantic (int semanticEnum) DISTI_METHOD_OVERRIDE |
| void | AddRef () DISTI_METHOD_OVERRIDE |
| Add to this object's reference count. More... | |
| void | Release () DISTI_METHOD_OVERRIDE |
| Release a reference to this object. More... | |
| unsigned int | GlsRenderEffect_ClassID () const DISTI_METHOD_OVERRIDE |
| void | SetupEffect (DynamicArray< Material > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3, unsigned int maxLightNum, unsigned int activeLightMask) DISTI_METHOD_OVERRIDE |
| void | CleanupEffect () DISTI_METHOD_OVERRIDE |
| Remove the effect from the OpenGL state. More... | |
| int | Compare (const GlsRenderEffect *other) const DISTI_METHOD_OVERRIDE |
| GlsRenderEffect * | Clone () const DISTI_METHOD_OVERRIDE |
Public Member Functions inherited from GlsRenderEffect | |
| virtual void | AddRef ()=0 |
| Add to this object's reference count. More... | |
| virtual void | Release ()=0 |
| Release a reference to this object. More... | |
| virtual unsigned int | GlsRenderEffect_ClassID () const =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 from the OpenGL state. More... | |
| virtual int | Compare (const GlsRenderEffect *other) const =0 |
| bool | Equals (const GlsRenderEffect *other) const |
| virtual DistiAttribDict & | Attributes ()=0 |
| virtual const std::string & | EffectTypeName ()=0 |
| virtual GlsRenderEffect * | Clone () const =0 |
| virtual void | GetReferencedMaterials (ReferencedMaterialArray &referencedMaterials) |
| virtual void | GetReferencedTextures (ReferencedTextureArray &referencedTextures) |
| virtual GLint | GetVertexAttribIndexForSemantic (int semanticEnum)=0 |
Public Attributes | |
| FilePathClass * | _effectScriptPath |
| File path to the script for this effect. | |
| FloatParamsT | _floatParams |
| Float parameter storage. | |
| IntParamsT | _intParams |
| Int parameter storage. | |
| ColorParamsT | _colorParams |
| Color parameter storage. | |
| VectorParamsT | _vectorParams |
| Vector parameter storage. | |
| BoolParamsT | _boolParams |
| Bool parameter storage. | |
| IntParamsT | _texture2DIndexParams |
| 2D texture parameter storage. | |
| IntParamsT | _textureCUBEIndexParams |
| Cube map parameter storage. | |
Protected Member Functions | |
| void | SetupHelperEffect () |
| void | SetupAttribDict () |
Protected Attributes | |
| unsigned int | _ref_count |
| Reference count. | |
| unsigned int | _materialIndex |
| The material index to use. | |
| Effect_DiffNormSpecRefl * | _helperEffect |
| DistiAttribDict * | _attribDict |
| The attribute dictionary for this object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from GlsRenderEffect | |
| static unsigned int | SetDebugMode (const char *modeName, bool value) |
| static unsigned int | RegisterNewClassID (const char *debugStr=NULL) |
| static bool | RegisterDebugModeChangeCallback (void *param, DebugModeChangeCallback func) |
| static bool | UnregisterDebugModeChangeCallback (void *param, DebugModeChangeCallback func) |
Render effect that supports DirectX effect scripts. This will not render anything special in the Editor or in the GLStudio runtime; it only holds the effect configuration for processing by the Lumen converter/generator.
|
virtual |
Add to this object's reference count.
Implements GlsRenderEffect.
|
inlinevirtual |
Implements GlsRenderEffect.
|
virtual |
Remove the effect from the OpenGL state.
Implements GlsRenderEffect.
|
virtual |
Implements GlsRenderEffect.
|
virtual |
| other | The effect to compare with. |
Implements GlsRenderEffect.
|
inlinevirtual |
Implements GlsRenderEffect.
|
inline |
|
virtual |
| semanticEnum | The sematic value (see AttributeSemanticEnum) |
Implements VertexAttribIndexLookup.
|
virtual |
Allows for static casting in compare functions
Implements GlsRenderEffect.
|
inline |
Inequality operator
| o | The object to compare to. |
| const Effect_DirectXShader & operator= | ( | const Effect_DirectXShader & | ) |
Assignment operator
| bool operator== | ( | const Effect_DirectXShader & | ) | const |
Equality operator
|
virtual |
Release a reference to this object.
Implements GlsRenderEffect.
| void SelectShader | ( | ) |
Selects the shader to use based on the current effect parameters.
|
inline |
Set the material index for this effect.
| materialIndex | The new material index for this effect. |
|
protected |
Called to add this object's attributes to the dictionary.
|
virtual |
Apply the effect to the OpenGL state
| materialPalette | Used to access material settings |
| texturePalette | Used to access texture maps |
| textureSettings | The object-level texture settings |
| viewToWorld3x3 | A 3x3 matrix containing the current viewToWorld transfrom. Used for environment mapping effects. |
| maxLightNum | The number of active lights in the scene. Used to speed up light calculations. |
| activeLightMask | A 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) |
Implements GlsRenderEffect.
|
protected |
Sets up _helperEffect.
|
protected |
Used for rendering the object in the editor; we'll just set up a basic grey