GL Studio API
Classes | Public Member Functions | Protected Attributes | List of all members
Effect_DiffNormSpecRefl Class Reference

#include <effect_diff_norm_spec_refl.h>

Inheritance diagram for Effect_DiffNormSpecRefl:
GlsRenderEffect VertexAttribIndexLookup

Classes

class  TextureUVWMatrix
 

Public Member Functions

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

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
 

Detailed Description

Render effect that supports diffuse, normal, specular, and reflection maps.

Constructor & Destructor Documentation

Assignment operator

Member Function Documentation

virtual void AddRef ( )
virtual

Manage references to the effect

Implements GlsRenderEffect.

virtual GlsRenderEffect* Clone ( ) const
virtual

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

Implements GlsRenderEffect.

virtual int Compare ( const GlsRenderEffect other) const
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.

Implements GlsRenderEffect.

virtual void GetReferencedMaterials ( ReferencedMaterialArray referencedMaterials)
virtual

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

Reimplemented from GlsRenderEffect.

virtual void GetReferencedTextures ( ReferencedTextureArray referencedTextures)
virtual

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

Reimplemented from GlsRenderEffect.

virtual GLint GetVertexAttribIndexForSemantic ( int  semanticEnum)
virtual
Returns
The attributeIndex that should be used to pass the vertex attributes or -1 if they are not needed (see glVertexAttrib)
Parameters
semanticEnumThe sematic value (see AttributeSemanticEnum)

Implements VertexAttribIndexLookup.

virtual void SetupEffect ( DynamicArray< Material, false > &  materialPalette,
TexturePalette texturePalette,
const TextureSettings textureSettings,
float *  viewToWorld3x3 
)
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.

Implements GlsRenderEffect.

Member Data Documentation

bool _normalMapFlipGreen
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


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