43 #ifndef _EFFECT_DIFF_NORM_SPEC_REF_H_INCLUDED
44 #define _EFFECT_DIFF_NORM_SPEC_REF_H_INCLUDED
50 # pragma warning( push )
51 # pragma warning( disable : 4244 )
55 # pragma warning( pop )
63 #if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
64 && defined( _MSC_VER )
65 # if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
66 # define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport )
68 # define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
71 # define GLSGEN_GlsAdvancedMesh_EXPORT
85 static const std::string EFFECT_TYPE_NAME;
105 void UOffset(
float val ) { _uOffset = val; }
106 float UOffset()
const {
return _uOffset; }
107 void VOffset(
float val ) { _vOffset = val; }
108 float VOffset()
const {
return _vOffset; }
109 void UTiling(
float val ) { _uTiling = val; }
110 float UTiling()
const {
return _uTiling; }
111 void VTiling(
float val ) { _vTiling = val; }
112 float VTiling()
const {
return _vTiling; }
113 void Angle(
float val ) { _angle = val; }
114 float Angle()
const {
return _angle; }
117 void RecalcTransformMatrix();
120 inline bool IsIdentity() {
return _isIdentity; }
123 inline float* GetTransformMatrix() {
return _matrix.
Data(); }
132 bool _userHasCustomShader;
133 #elif !defined( GLES )
162 void SetupAttribDict();
166 static const GLenum NORMAL_MAP_TEXTURE_UNIT = GL_TEXTURE1;
167 static const GLenum SPECULAR_MAP_TEXTURE_UNIT = GL_TEXTURE2;
168 static const GLenum REFLECTION_MAP_TEXTURE_UNIT = GL_TEXTURE3;
174 static inline unsigned int TextureUnitIndex( GLenum textureUnit ) {
return textureUnit - GL_TEXTURE0; }
176 static const int INVALID_INDEX = -1;
188 inline void SetMaterialIndex(
unsigned int materialIndex ) { _materialIndex = materialIndex; }
189 inline unsigned int GetMaterialIndex()
const {
return _materialIndex; }
191 inline void SetUseVertexColor(
bool value )
193 _useVertexColors = value;
200 inline void SetDiffuseTextureIndex(
int textureIndex )
202 _diffuseTextureIndex = textureIndex;
209 inline void SetNormalTextureIndex(
int textureIndex )
211 _normalTextureIndex = textureIndex;
218 inline void SetSpecularTextureIndex(
int textureIndex )
220 _specularTextureIndex = textureIndex;
227 inline void SetReflectionTextureIndex(
int textureIndex )
229 _reflectionTextureIndex = textureIndex;
236 inline void SetDiffuseAmount(
float value )
238 _diffuseAmount = value;
245 inline void SetNormalAmount(
float value )
247 _normalAmount = value;
252 inline float GetNormalAmount()
const {
return _normalAmount; }
254 inline void SetSpecularAmount(
float value )
256 _specularAmount = value;
263 inline void SetReflectionAmount(
float value )
265 _reflectionAmount = value;
272 inline void SetNormalMapFlipGreen(
bool value )
274 _normalMapFlipGreen = value;
289 GLSGEN_GlsAdvancedMesh_EXPORT
void SetDiffuseUVWSettings(
float uOffset,
float vOffset,
float uTiling,
float vTiling,
float angle );
290 GLSGEN_GlsAdvancedMesh_EXPORT
void GetDiffuseUVWSettings(
float& uOffset,
float& vOffset,
float& uTiling,
float& vTiling,
float& angle );
300 GLSGEN_GlsAdvancedMesh_EXPORT
void SetNormalUVWSettings(
float uOffset,
float vOffset,
float uTiling,
float vTiling,
float angle );
301 GLSGEN_GlsAdvancedMesh_EXPORT
void GetNormalUVWSettings(
float& uOffset,
float& vOffset,
float& uTiling,
float& vTiling,
float& angle );
311 GLSGEN_GlsAdvancedMesh_EXPORT
void SetSpecularUVWSettings(
float uOffset,
float vOffset,
float uTiling,
float vTiling,
float angle );
312 GLSGEN_GlsAdvancedMesh_EXPORT
void GetSpecularUVWSettings(
float& uOffset,
float& vOffset,
float& uTiling,
float& vTiling,
float& angle );
316 GLSGEN_GlsAdvancedMesh_EXPORT
void SelectShader();
320 GLSGEN_GlsAdvancedMesh_EXPORT
void TextureUVWSettingsChanged();
324 GLSGEN_GlsAdvancedMesh_EXPORT
bool UsesTextureTransforms();
327 inline DistiAttribDict& Attributes()
337 inline const std::string& EffectTypeName()
339 return EFFECT_TYPE_NAME;
352 virtual void Release();
353 virtual unsigned int GlsRenderEffect_ClassID()
const;
355 DynamicArray<Material, false>& materialPalette,
356 TexturePalette* texturePalette,
357 const TextureSettings& textureSettings,
358 float* viewToWorld3x3
359 #
if !( ( GLS_VERSION_MAJOR == 4 && ( GLS_VERSION_MINOR == 1 || GLS_VERSION_MINOR == 0 ) ) || GLS_VERSION_MAJOR <= 3 )
361 unsigned int maxLightNum,
362 unsigned int activeLightMask
367 virtual int Compare(
const GlsRenderEffect* )
const;
368 virtual GlsRenderEffect*
Clone()
const;
Definition: effect_diff_norm_spec_refl.h:87
Definition: gls_es20_effect.h:58
Definition: effect_diff_norm_spec_refl.h:82
unsigned int _ref_count
Reference count.
Definition: effect_diff_norm_spec_refl.h:127
float _normalAmount
[0.0,1.0] "Weight" of the normal map
Definition: effect_diff_norm_spec_refl.h:144
The GlsMatrixAffine class.
bool _useVertexColors
true: use vertex color for diffuse rather than material diffuse
Definition: effect_diff_norm_spec_refl.h:148
virtual GlsRenderEffect * Clone() const
virtual void SetupEffect(DynamicArray< Material, false > &materialPalette, TexturePalette *texturePalette, const TextureSettings &textureSettings, float *viewToWorld3x3)
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 int Compare(const GlsRenderEffect *) const
float _specularAmount
[0.0,1.0] "Weight" of the specular map
Definition: effect_diff_norm_spec_refl.h:145
float _reflectionAmount
[0.0,1.0] "Weight" of the reflection map
Definition: effect_diff_norm_spec_refl.h:146
MaxLike_Shader * _shader
shader program to use (if any)
Definition: effect_diff_norm_spec_refl.h:134
int _diffuseTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:138
Type * Data()
Definition: gls_matrix.h:131
unsigned int _materialIndex
The material index to use.
Definition: effect_diff_norm_spec_refl.h:137
virtual GLint GetVertexAttribIndexForSemantic(int semanticEnum)
int _specularTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:140
Definition: disti_metadata.h:660
bool _normalMapFlipGreen
Definition: effect_diff_norm_spec_refl.h:154
int _reflectionTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:141
float _diffuseAmount
[0.0,1.0] "Weight" of the diffuse map
Definition: effect_diff_norm_spec_refl.h:143
int _normalTextureIndex
INVALID_INDEX, or the texture index to use.
Definition: effect_diff_norm_spec_refl.h:139
Definition: gls_render_effect.h:115
Definition: bmpimage.h:46
virtual void GetReferencedMaterials(ReferencedMaterialArray &referencedMaterials)
The disti::GlsRenderEffect class.