|
GL Studio C++ Runtime API
|
#include <effect_diff_norm_spec_refl.h>
Classes | |
| class | TextureUVWMatrix |
Public Member Functions | |
| Effect_DiffNormSpecRefl (const Effect_DiffNormSpecRefl &) | |
| Copy constructor. | |
| const Effect_DiffNormSpecRefl & | operator= (const Effect_DiffNormSpecRefl &) |
| bool | operator== (const Effect_DiffNormSpecRefl &) const |
| bool | operator!= (const Effect_DiffNormSpecRefl &o) const |
| void | SetMaterialIndex (unsigned int materialIndex) |
| unsigned int | GetMaterialIndex () const |
| void | SetUseVertexColor (bool value) |
| bool | GetUseVertexColor () const |
| void | SetDiffuseTextureIndex (int textureIndex) |
| int | GetDiffuseTextureIndex () const |
| void | SetNormalTextureIndex (int textureIndex) |
| int | GetNormalTextureIndex () const |
| void | SetSpecularTextureIndex (int textureIndex) |
| int | GetSpecularTextureIndex () const |
| void | SetReflectionTextureIndex (int textureIndex) |
| int | GetReflectionTextureIndex () const |
| void | SetDiffuseAmount (float value) |
| float | GetDiffuseAmount () const |
| void | SetNormalAmount (float value) |
| float | GetNormalAmount () const |
| void | SetSpecularAmount (float value) |
| float | GetSpecularAmount () const |
| void | SetReflectionAmount (float value) |
| float | GetReflectionAmount () const |
| void | SetNormalMapFlipGreen (bool value) |
| bool | GetNormalMapFlipGreen () const |
| void | SetDiffuseUVWSettings (float uOffset, float vOffset, float uTiling, float vTiling, float angle) |
| void | GetDiffuseUVWSettings (float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle) |
| void | SetNormalUVWSettings (float uOffset, float vOffset, float uTiling, float vTiling, float angle) |
| void | GetNormalUVWSettings (float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle) |
| void | SetSpecularUVWSettings (float uOffset, float vOffset, float uTiling, float vTiling, float angle) |
| void | GetSpecularUVWSettings (float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle) |
| void | SelectShader () |
| void | TextureUVWSettingsChanged () |
| bool | UsesTextureTransforms () |
| DistiAttribDict & | Attributes () DISTI_METHOD_OVERRIDE |
| const std::string & | EffectTypeName () DISTI_METHOD_OVERRIDE |
| virtual GLint | GetVertexAttribIndexForSemantic (int semanticEnum) DISTI_METHOD_OVERRIDE |
| virtual void | AddRef () DISTI_METHOD_OVERRIDE |
| Add to this object's reference count. More... | |
| virtual void | Release () DISTI_METHOD_OVERRIDE |
| Release a reference to this object. More... | |
| virtual unsigned int | GlsRenderEffect_ClassID () const DISTI_METHOD_OVERRIDE |
| virtual void | SetupEffect (DynamicArray< Material > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3, unsigned int maxLightNum, unsigned int activeLightMask) DISTI_METHOD_OVERRIDE |
| virtual void | CleanupEffect () DISTI_METHOD_OVERRIDE |
| Remove the effect trom the OpenGL state. More... | |
| virtual int | Compare (const GlsRenderEffect *) const DISTI_METHOD_OVERRIDE |
| virtual GlsRenderEffect * | Clone () const DISTI_METHOD_OVERRIDE |
| virtual void | GetReferencedTextures (ReferencedTextureArray &referencedTextures) DISTI_METHOD_OVERRIDE |
| virtual void | GetReferencedMaterials (ReferencedMaterialArray &referencedMaterials) 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 trom 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 |
Protected Member Functions | |
| void | SetupAttribDict () |
Protected Attributes | |
| unsigned int | _ref_count |
| Reference count. | |
| MaxLike_Shader * | _shader |
| shader program to use (if any) | |
| unsigned int | _materialIndex |
| The material index to use. | |
| int | _diffuseTextureIndex |
| INVALID_INDEX, or the texture index to use. | |
| int | _normalTextureIndex |
| INVALID_INDEX, or the texture index to use. | |
| int | _specularTextureIndex |
| INVALID_INDEX, or the texture index to use. | |
| int | _reflectionTextureIndex |
| INVALID_INDEX, or the texture index to use. | |
| float | _diffuseAmount |
| [0.0,1.0] "Weight" of the diffuse map | |
| float | _normalAmount |
| [0.0,1.0] "Weight" of the normal map | |
| float | _specularAmount |
| [0.0,1.0] "Weight" of the specular map | |
| float | _reflectionAmount |
| [0.0,1.0] "Weight" of the reflection map | |
| bool | _useVertexColors |
| true: use vertex color for diffuse rather than material diffuse | |
| bool | _normalMapFlipGreen |
| DistiAttribDict * | _attribDict |
| The attribute dictionary for this object. | |
| TextureUVWMatrix | _diffuseUVWMatrix |
| The texture transform for the diffuse texture. | |
| TextureUVWMatrix | _normalUVWMatrix |
| The texture transform for the normal texture. | |
| TextureUVWMatrix | _specularUVWMatrix |
| The texture transform for the specular texture. | |
Additional Inherited Members | |
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 } |
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 diffuse, normal, specular, and reflection maps.
|
virtual |
Add to this object's reference count.
Implements GlsRenderEffect.
|
inlinevirtual |
Implements GlsRenderEffect.
|
virtual |
Remove the effect trom the OpenGL state.
Implements GlsRenderEffect.
|
virtual |
Implements GlsRenderEffect.
|
virtual |
| other | The effect to compare with. |
Implements GlsRenderEffect.
|
inlinevirtual |
Implements GlsRenderEffect.
|
inline |
|
inline |
| void GetDiffuseUVWSettings | ( | float & | uOffset, |
| float & | vOffset, | ||
| float & | uTiling, | ||
| float & | vTiling, | ||
| float & | angle | ||
| ) |
Get Diffuse Map UV transform parameters.
| uOffset | Returned u axis translation. |
| vOffset | Returned v axis translation. |
| uTiling | Returned u axis scaling. |
| vTiling | Returned v axis scaling. |
| angle | Returned x axis rotation in degrees. |
|
inline |
|
inline |
|
inline |
|
inline |
| void GetNormalUVWSettings | ( | float & | uOffset, |
| float & | vOffset, | ||
| float & | uTiling, | ||
| float & | vTiling, | ||
| float & | angle | ||
| ) |
Get Normal Map UV transform parameters.
| uOffset | Returned u axis translation. |
| vOffset | Returned v axis translation. |
| uTiling | Returned u axis scaling. |
| vTiling | Returned v axis scaling. |
| angle | Returned W-axis rotation in degrees. |
|
virtual |
Checks whether or not the effect is transparent. Implementing is optional Inserts all referenced textures into the array passed in. Implementing is optional.
| referencedMaterials | A returned array of material indices. |
Reimplemented from GlsRenderEffect.
|
virtual |
Inserts all referenced textures into the array passed in. Implementing is optional.
| referencedTextures | A returned array of texture indices. |
Reimplemented from GlsRenderEffect.
|
inline |
|
inline |
|
inline |
|
inline |
| void GetSpecularUVWSettings | ( | float & | uOffset, |
| float & | vOffset, | ||
| float & | uTiling, | ||
| float & | vTiling, | ||
| float & | angle | ||
| ) |
Get Specular Map UV transform parameters.
| uOffset | Returned u axis translation. |
| vOffset | Returned v axis translation. |
| uTiling | Returned u axis scaling. |
| vTiling | Returned v axis scaling. |
| angle | Returned W-axis rotation in degrees. |
|
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. |
| const Effect_DiffNormSpecRefl & operator= | ( | const Effect_DiffNormSpecRefl & | ) |
Assignment operator
| bool operator== | ( | const Effect_DiffNormSpecRefl & | ) | 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 weight of the diffuse texture from 0.0 to 1.0.
| value | The new weight to set. |
|
inline |
Set the texture index that will provide the diffuse color for the effect.
| textureIndex | The new texture index to set. |
| void SetDiffuseUVWSettings | ( | float | uOffset, |
| float | vOffset, | ||
| float | uTiling, | ||
| float | vTiling, | ||
| float | angle | ||
| ) |
Set Diffuse Map UV transform parameters.
| uOffset | U axis translation. |
| vOffset | V axis translation. |
| uTiling | U axis scaling. |
| vTiling | V axis scaling. |
| angle | X axis rotation in degrees. |
|
inline |
Set the material index for this effect.
| materialIndex | The new material index for this effect. |
|
inline |
Set the weight of the normal texture from 0.0 to 1.0.
| value | The new weight to set. |
|
inline |
Set flipping the normal map green channel for DirectX textures (true) or OpenGL textures (false).
| value | The new flip value. |
|
inline |
Set the texture index that will provide normals for the effect
| textureIndex | The new texture index to set. |
| void SetNormalUVWSettings | ( | float | uOffset, |
| float | vOffset, | ||
| float | uTiling, | ||
| float | vTiling, | ||
| float | angle | ||
| ) |
Set Normal Map UV transform parameters.
| uOffset | U axis translation. |
| vOffset | V axis translation. |
| uTiling | U axis scaling. |
| vTiling | V axis scaling. |
| angle | W-axis rotation in degrees. |
|
inline |
Set the weight of the reflection texture from 0.0 to 1.0.
| value | The new weight to set. |
|
inline |
Set the texture index that will provide reflections for this effect.
| textureIndex | The new texture index to set. |
|
inline |
Set the weight of the specular texture from 0.0 to 1.0.
| value | The new weight to set. |
|
inline |
Set the texture index that will provide specular for this effect.
| textureIndex | The new texture index to set. |
| void SetSpecularUVWSettings | ( | float | uOffset, |
| float | vOffset, | ||
| float | uTiling, | ||
| float | vTiling, | ||
| float | angle | ||
| ) |
Set Specular Map UV transform parameters.
| uOffset | U axis translation. |
| vOffset | V axis translation. |
| uTiling | U axis scaling. |
| vTiling | V axis scaling. |
| angle | W-axis rotation in degrees. |
|
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.
|
inline |
Set whether or not to use vertex colors, rather than material colors.
| value | The new value to set. |
| void TextureUVWSettingsChanged | ( | ) |
Recalculate the texture transform matrices.
| bool UsesTextureTransforms | ( | ) |
|
protected |
true: expect 'DirectX' format normal maps (positive Green points down) false: expect 'OpenGL' format normal maps (positive Green points up) Note: the sense is backwards from the Max 'Normal Bump' 'Flip Green' option because Max defaults to 'DirectX' format and GL Studio defaults to 'OpenGL' format