43 #ifndef INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H 
   44 #define INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H 
   54 #if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \ 
   55     && defined( _MSC_VER ) 
   56 #    if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) 
   57 #        define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport ) 
   59 #        define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport ) 
   62 #    define GLSGEN_GlsAdvancedMesh_EXPORT 
   76     static const std::string EFFECT_TYPE_NAME;
 
   96         void  UOffset( 
float val ) { _uOffset = val; }
 
   97         float UOffset()
 const { 
return _uOffset; }
 
   98         void  VOffset( 
float val ) { _vOffset = val; }
 
   99         float VOffset()
 const { 
return _vOffset; }
 
  100         void  UTiling( 
float val ) { _uTiling = val; }
 
  101         float UTiling()
 const { 
return _uTiling; }
 
  102         void  VTiling( 
float val ) { _vTiling = val; }
 
  103         float VTiling()
 const { 
return _vTiling; }
 
  104         void  Angle( 
float val ) { _angle = val; }
 
  105         float Angle()
 const { 
return _angle; }
 
  108         void RecalcTransformMatrix();
 
  111         inline bool IsIdentity() { 
return _isIdentity; }
 
  114         inline float* GetTransformMatrix() { 
return _matrix.
Data(); }
 
  123     bool       _userHasCustomShader; 
 
  124 #elif !defined( GLES ) 
  153     void SetupAttribDict();
 
  157     static const GLenum NORMAL_MAP_TEXTURE_UNIT     = GL_TEXTURE1; 
 
  158     static const GLenum SPECULAR_MAP_TEXTURE_UNIT   = GL_TEXTURE2; 
 
  159     static const GLenum REFLECTION_MAP_TEXTURE_UNIT = GL_TEXTURE3; 
 
  165     static inline unsigned int TextureUnitIndex( GLenum textureUnit ) { 
return textureUnit - GL_TEXTURE0; }
 
  167     static const int INVALID_INDEX = -1;
 
  179     inline void         SetMaterialIndex( 
unsigned int materialIndex ) { _materialIndex = materialIndex; }
 
  180     inline unsigned int GetMaterialIndex()
 const { 
return _materialIndex; }
 
  182     inline void SetUseVertexColor( 
bool value )
 
  184         _useVertexColors = value;
 
  191     inline void SetDiffuseTextureIndex( 
int textureIndex )
 
  193         _diffuseTextureIndex = textureIndex;
 
  200     inline void SetNormalTextureIndex( 
int textureIndex )
 
  202         _normalTextureIndex = textureIndex;
 
  209     inline void SetSpecularTextureIndex( 
int textureIndex )
 
  211         _specularTextureIndex = textureIndex;
 
  218     inline void SetReflectionTextureIndex( 
int textureIndex )
 
  220         _reflectionTextureIndex = textureIndex;
 
  227     inline void SetDiffuseAmount( 
float value )
 
  229         _diffuseAmount = value;
 
  236     inline void SetNormalAmount( 
float value )
 
  238         _normalAmount = value;
 
  243     inline float GetNormalAmount()
 const { 
return _normalAmount; }
 
  245     inline void SetSpecularAmount( 
float value )
 
  247         _specularAmount = value;
 
  254     inline void SetReflectionAmount( 
float value )
 
  256         _reflectionAmount = value;
 
  263     inline void SetNormalMapFlipGreen( 
bool value )
 
  265         _normalMapFlipGreen = value;
 
  280     GLSGEN_GlsAdvancedMesh_EXPORT 
void SetDiffuseUVWSettings( 
float uOffset, 
float vOffset, 
float uTiling, 
float vTiling, 
float angle );
 
  281     GLSGEN_GlsAdvancedMesh_EXPORT 
void GetDiffuseUVWSettings( 
float& uOffset, 
float& vOffset, 
float& uTiling, 
float& vTiling, 
float& angle );
 
  291     GLSGEN_GlsAdvancedMesh_EXPORT 
void SetNormalUVWSettings( 
float uOffset, 
float vOffset, 
float uTiling, 
float vTiling, 
float angle );
 
  292     GLSGEN_GlsAdvancedMesh_EXPORT 
void GetNormalUVWSettings( 
float& uOffset, 
float& vOffset, 
float& uTiling, 
float& vTiling, 
float& angle );
 
  302     GLSGEN_GlsAdvancedMesh_EXPORT 
void SetSpecularUVWSettings( 
float uOffset, 
float vOffset, 
float uTiling, 
float vTiling, 
float angle );
 
  303     GLSGEN_GlsAdvancedMesh_EXPORT 
void GetSpecularUVWSettings( 
float& uOffset, 
float& vOffset, 
float& uTiling, 
float& vTiling, 
float& angle );
 
  307     GLSGEN_GlsAdvancedMesh_EXPORT 
void SelectShader();
 
  311     GLSGEN_GlsAdvancedMesh_EXPORT 
void TextureUVWSettingsChanged();
 
  315     GLSGEN_GlsAdvancedMesh_EXPORT 
bool UsesTextureTransforms();
 
  318     inline DistiAttribDict& Attributes()
 
  328     inline const std::string& EffectTypeName()
 
  330         return EFFECT_TYPE_NAME;
 
  343     virtual void         Release();
 
  344     virtual unsigned int GlsRenderEffect_ClassID() 
const;
 
  346                 DynamicArray<Material>& materialPalette,
 
  347                 TexturePalette*         texturePalette,
 
  348                 const TextureSettings&  textureSettings,
 
  349                 float*                  viewToWorld3x3, 
 
  350                 unsigned int            maxLightNum,
 
  351                 unsigned int            activeLightMask );
 
  354     virtual int              Compare( 
const GlsRenderEffect* ) 
const;
 
  355     virtual GlsRenderEffect* 
Clone() 
const;
 
Definition: effect_diff_norm_spec_refl.h:78
Definition: gls_es20_effect.h:58
Definition: effect_diff_norm_spec_refl.h:73
unsigned int _ref_count
Reference count. 
Definition: effect_diff_norm_spec_refl.h:118
float _normalAmount
[0.0,1.0] "Weight" of the normal map 
Definition: effect_diff_norm_spec_refl.h:135
The GlsMatrixAffine class. 
bool _useVertexColors
true: use vertex color for diffuse rather than material diffuse 
Definition: effect_diff_norm_spec_refl.h:139
virtual GlsRenderEffect * Clone() const 
The disti::GlsStateManager factory class. Creates an instance of a state manager that manages the GL ...
virtual void GetReferencedTextures(ReferencedTextureArray &referencedTextures)
virtual void CleanupEffect()
Remove the effect trom the OpenGL state. 
virtual void SetupEffect(DynamicArray< Material > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3, unsigned int maxLightNum, unsigned int activeLightMask)
virtual int Compare(const GlsRenderEffect *) const 
float _specularAmount
[0.0,1.0] "Weight" of the specular map 
Definition: effect_diff_norm_spec_refl.h:136
float _reflectionAmount
[0.0,1.0] "Weight" of the reflection map 
Definition: effect_diff_norm_spec_refl.h:137
MaxLike_Shader * _shader
shader program to use (if any) 
Definition: effect_diff_norm_spec_refl.h:125
int _diffuseTextureIndex
INVALID_INDEX, or the texture index to use. 
Definition: effect_diff_norm_spec_refl.h:129
Type * Data()
Definition: gls_matrix.h:131
unsigned int _materialIndex
The material index to use. 
Definition: effect_diff_norm_spec_refl.h:128
virtual GLint GetVertexAttribIndexForSemantic(int semanticEnum)
int _specularTextureIndex
INVALID_INDEX, or the texture index to use. 
Definition: effect_diff_norm_spec_refl.h:131
Definition: disti_metadata.h:668
bool _normalMapFlipGreen
Definition: effect_diff_norm_spec_refl.h:145
int _reflectionTextureIndex
INVALID_INDEX, or the texture index to use. 
Definition: effect_diff_norm_spec_refl.h:132
float _diffuseAmount
[0.0,1.0] "Weight" of the diffuse map 
Definition: effect_diff_norm_spec_refl.h:134
int _normalTextureIndex
INVALID_INDEX, or the texture index to use. 
Definition: effect_diff_norm_spec_refl.h:130
Definition: gls_render_effect.h:117
Definition: bmpimage.h:46
virtual void GetReferencedMaterials(ReferencedMaterialArray &referencedMaterials)
The disti::GlsRenderEffect class.