39#ifndef INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H
40#define INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H
50#if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
51 && defined( _MSC_VER )
52# if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
53# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport )
55# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
58# define GLSGEN_GlsAdvancedMesh_EXPORT
97 void UOffset(
float val ) { _uOffset = val; }
125 void Angle(
float val ) { _angle = val; }
128 float Angle()
const {
return _angle; }
147 bool _userHasCustomShader;
148#elif !defined( GLES )
183 static const GLenum NORMAL_MAP_TEXTURE_UNIT = GL_TEXTURE1;
184 static const GLenum SPECULAR_MAP_TEXTURE_UNIT = GL_TEXTURE2;
185 static const GLenum REFLECTION_MAP_TEXTURE_UNIT = GL_TEXTURE3;
191 static unsigned int TextureUnitIndex( GLenum textureUnit ) {
return textureUnit - GL_TEXTURE0; }
359 GLSGEN_GlsAdvancedMesh_EXPORT
void SetDiffuseUVWSettings(
float uOffset,
float vOffset,
float uTiling,
float vTiling,
float angle );
367 GLSGEN_GlsAdvancedMesh_EXPORT
void GetDiffuseUVWSettings(
float& uOffset,
float& vOffset,
float& uTiling,
float& vTiling,
float& angle );
376 GLSGEN_GlsAdvancedMesh_EXPORT
void SetNormalUVWSettings(
float uOffset,
float vOffset,
float uTiling,
float vTiling,
float angle );
384 GLSGEN_GlsAdvancedMesh_EXPORT
void GetNormalUVWSettings(
float& uOffset,
float& vOffset,
float& uTiling,
float& vTiling,
float& angle );
393 GLSGEN_GlsAdvancedMesh_EXPORT
void SetSpecularUVWSettings(
float uOffset,
float vOffset,
float uTiling,
float vTiling,
float angle );
401 GLSGEN_GlsAdvancedMesh_EXPORT
void GetSpecularUVWSettings(
float& uOffset,
float& vOffset,
float& uTiling,
float& vTiling,
float& angle );
455 float* viewToWorld3x3,
456 unsigned int maxLightNum,
Definition: disti_metadata.h:750
Definition: dynamic_array.h:79
Definition: effect_diff_norm_spec_refl.h:76
void RecalcTransformMatrix()
Should be called after changing the parameters.
bool IsIdentity()
Definition: effect_diff_norm_spec_refl.h:134
float VOffset() const
Definition: effect_diff_norm_spec_refl.h:107
void UTiling(float val)
Definition: effect_diff_norm_spec_refl.h:111
bool operator==(const TextureUVWMatrix &rhs) const
float UOffset() const
Definition: effect_diff_norm_spec_refl.h:100
void VOffset(float val)
Definition: effect_diff_norm_spec_refl.h:104
void VTiling(float val)
Definition: effect_diff_norm_spec_refl.h:118
float * GetTransformMatrix()
Definition: effect_diff_norm_spec_refl.h:138
void UOffset(float val)
Definition: effect_diff_norm_spec_refl.h:97
float VTiling() const
Definition: effect_diff_norm_spec_refl.h:121
float UTiling() const
Definition: effect_diff_norm_spec_refl.h:114
void Angle(float val)
Definition: effect_diff_norm_spec_refl.h:125
float Angle() const
Definition: effect_diff_norm_spec_refl.h:128
Definition: effect_diff_norm_spec_refl.h:70
void GetNormalUVWSettings(float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle)
void SetSpecularAmount(float value)
Definition: effect_diff_norm_spec_refl.h:315
int _reflectionTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:156
void TextureUVWSettingsChanged()
float _specularAmount
[0.0,1.0] "Weight" of the specular map
Definition: effect_diff_norm_spec_refl.h:160
void AddRef() DISTI_METHOD_OVERRIDE
Add to this object's reference count.
void SetSpecularUVWSettings(float uOffset, float vOffset, float uTiling, float vTiling, float angle)
void SetupEffect(DynamicArray< Material > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3, unsigned int maxLightNum, unsigned int activeLightMask) DISTI_METHOD_OVERRIDE
void SetDiffuseAmount(float value)
Definition: effect_diff_norm_spec_refl.h:289
GLint GetVertexAttribIndexForSemantic(int semanticEnum) DISTI_METHOD_OVERRIDE
void Release() DISTI_METHOD_OVERRIDE
Release a reference to this object.
void SetNormalUVWSettings(float uOffset, float vOffset, float uTiling, float vTiling, float angle)
bool UsesTextureTransforms()
unsigned int _materialIndex
The material index to use.
Definition: effect_diff_norm_spec_refl.h:152
int GetSpecularTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:272
int _normalTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:154
DistiAttribDict & Attributes() DISTI_METHOD_OVERRIDE
Definition: effect_diff_norm_spec_refl.h:416
int Compare(const GlsRenderEffect *other) const DISTI_METHOD_OVERRIDE
void SetMaterialIndex(unsigned int materialIndex)
Definition: effect_diff_norm_spec_refl.h:217
MaxLike_Shader * _shader
shader program to use (if any)
Definition: effect_diff_norm_spec_refl.h:149
void SetDiffuseTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:237
TextureUVWMatrix _normalUVWMatrix
The texture transform for the normal texture.
Definition: effect_diff_norm_spec_refl.h:174
bool _useVertexColors
true: use vertex color for diffuse rather than material diffuse
Definition: effect_diff_norm_spec_refl.h:163
float _normalAmount
[0.0,1.0] "Weight" of the normal map
Definition: effect_diff_norm_spec_refl.h:159
unsigned int _ref_count
Reference count.
Definition: effect_diff_norm_spec_refl.h:142
unsigned int GetMaterialIndex() const
Definition: effect_diff_norm_spec_refl.h:220
int GetDiffuseTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:246
bool _normalMapFlipGreen
Definition: effect_diff_norm_spec_refl.h:169
void SetReflectionAmount(float value)
Definition: effect_diff_norm_spec_refl.h:328
void SetUseVertexColor(bool value)
Definition: effect_diff_norm_spec_refl.h:224
void SetSpecularTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:263
static const std::string EFFECT_TYPE_NAME
Backing storage for the human readable string for this effect type.
Definition: effect_diff_norm_spec_refl.h:72
int GetNormalTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:259
void SetDiffuseUVWSettings(float uOffset, float vOffset, float uTiling, float vTiling, float angle)
unsigned int GlsRenderEffect_ClassID() const DISTI_METHOD_OVERRIDE
void SetReflectionTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:276
float GetNormalAmount() const
Definition: effect_diff_norm_spec_refl.h:311
TextureUVWMatrix _diffuseUVWMatrix
The texture transform for the diffuse texture.
Definition: effect_diff_norm_spec_refl.h:173
float GetDiffuseAmount() const
Definition: effect_diff_norm_spec_refl.h:298
float _reflectionAmount
[0.0,1.0] "Weight" of the reflection map
Definition: effect_diff_norm_spec_refl.h:161
float _diffuseAmount
[0.0,1.0] "Weight" of the diffuse map
Definition: effect_diff_norm_spec_refl.h:158
int GetReflectionTextureIndex() const
Definition: effect_diff_norm_spec_refl.h:285
void SetNormalMapFlipGreen(bool value)
Definition: effect_diff_norm_spec_refl.h:341
void GetReferencedTextures(ReferencedTextureArray &referencedTextures) DISTI_METHOD_OVERRIDE
void SetNormalTextureIndex(int textureIndex)
Definition: effect_diff_norm_spec_refl.h:250
bool GetNormalMapFlipGreen() const
Definition: effect_diff_norm_spec_refl.h:350
void GetReferencedMaterials(ReferencedMaterialArray &referencedMaterials) DISTI_METHOD_OVERRIDE
static const int INVALID_INDEX
Value to represent an invalid texture index.
Definition: effect_diff_norm_spec_refl.h:194
bool operator==(const Effect_DiffNormSpecRefl &) const
int _diffuseTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:153
DistiAttribDict * _attribDict
The attribute dictionary for this object.
Definition: effect_diff_norm_spec_refl.h:171
GlsRenderEffect * Clone() const DISTI_METHOD_OVERRIDE
void GetSpecularUVWSettings(float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle)
void GetDiffuseUVWSettings(float &uOffset, float &vOffset, float &uTiling, float &vTiling, float &angle)
void CleanupEffect() DISTI_METHOD_OVERRIDE
Remove the effect from the OpenGL state.
void SetNormalAmount(float value)
Definition: effect_diff_norm_spec_refl.h:302
float GetSpecularAmount() const
Definition: effect_diff_norm_spec_refl.h:324
const Effect_DiffNormSpecRefl & operator=(const Effect_DiffNormSpecRefl &)
bool operator!=(const Effect_DiffNormSpecRefl &o) const
Definition: effect_diff_norm_spec_refl.h:213
float GetReflectionAmount() const
Definition: effect_diff_norm_spec_refl.h:337
int _specularTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:155
bool GetUseVertexColor() const
Definition: effect_diff_norm_spec_refl.h:233
const std::string & EffectTypeName() DISTI_METHOD_OVERRIDE
Definition: effect_diff_norm_spec_refl.h:426
TextureUVWMatrix _specularUVWMatrix
The texture transform for the specular texture.
Definition: effect_diff_norm_spec_refl.h:175
Definition: gls_es20_effect.h:56
Type * Data()
Definition: gls_matrix.h:127
Definition: gls_render_effect.h:135
Definition: gls_render_effect.h:115
Definition: material.h:54
Definition: texture_palette.h:185
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
The GlsMatrixAffine class.
The disti::GlsRenderEffect class.
The disti::GlsStateManager factory class. Creates an instance of a state manager that manages the GL ...
Definition: bmpimage.h:46