GL Studio C++ Runtime API
effect_diff_norm_spec_refl.h
Go to the documentation of this file.
1/// \file effect_diff_norm_spec_refl.h
2/// \brief Render effect that supports diffuse, normal, specular, and reflection maps
3///
4/// \par Copyright Information
5///
6/// Copyright (c) 2017 by The DiSTI Corporation.<br>
7/// 12249 Science Drive; Suite 300<br>
8/// Orlando, Florida 32826<br>
9/// USA<br>
10/// <br>
11/// All rights reserved.<br>
12///
13/// This Software contains proprietary trade secrets of DiSTI and may not be
14/// reproduced, in whole or part, in any form, or by any means of electronic,
15/// mechanical, or otherwise, without the written permission of DiSTI. Said
16/// permission may be derived through the purchase of applicable DiSTI product
17/// licenses which detail the distribution rights of this content and any
18/// Derivative Works based on this or other copyrighted DiSTI Software.
19///
20/// NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21/// AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22/// PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23/// AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24/// IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25/// PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26///
27/// LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28/// IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29/// INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30/// DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31/// INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32/// INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33/// OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34/// EXCEED FIVE DOLLARS (US$5.00).
35///
36/// The aforementioned terms and restrictions are governed by the laws of the
37/// State of Florida and the United States of America.
38
39#ifndef INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H
40#define INCLUDED_EFFECT_DIFF_NORM_SPEC_REF_H
41
42#include "gls_matrix_affine.h"
43#include "gls_render_effect.h"
44
45#ifdef GLES
46# include "gls_state_manager.h"
47#endif
48
49//////////////////// Provides support for creating DLLs ////////////////////////
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 )
54# else
55# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
56# endif
57#else
58# define GLSGEN_GlsAdvancedMesh_EXPORT
59#endif
60///////////////////////////////////////////////////////////////////////////////
61
62namespace disti
63{
64#ifndef GLES
65class MaxLike_Shader;
66#endif
67
68/** Render effect that supports diffuse, normal, specular, and reflection maps. */
70{
71public:
72 static const std::string EFFECT_TYPE_NAME; ///< Backing storage for the human readable string for this effect type.
73
74 /// \details The TextureUVWMatrix class. Describes a texture transformation.
76 {
77 bool _isIdentity; ///< Is true if the matrix is identity.
78
79 float _uOffset; ///< Texture U (X) offset.
80 float _vOffset; ///< Texture V (Y) offset.
81 float _uTiling; ///< Texture scaling on U (X) axis.
82 float _vTiling; ///< Texture scaling on V (Y) axis.
83 float _angle; ///< Texture rotation angle in degrees.
84
85 GlsMatrixAffineF _matrix; ///< Texture transform matrix.
86
87 public:
89
90 /// Equality operator
91 /// \param rhs The object to compare.
92 /// \return Whether or not the objects are equal.
93 bool operator==( const TextureUVWMatrix& rhs ) const;
94
95 /// Sets the U offset for this texture.
96 /// \param val The new U offset to set.
97 void UOffset( float val ) { _uOffset = val; }
98
99 /// \return The U offset for this texture.
100 float UOffset() const { return _uOffset; }
101
102 /// Sets the V offset for this texture.
103 /// \param val The new V offset to set.
104 void VOffset( float val ) { _vOffset = val; }
105
106 /// \return The V offset for this texture.
107 float VOffset() const { return _vOffset; }
108
109 /// Sets the U scale for this texture.
110 /// \param val The new U scale to set.
111 void UTiling( float val ) { _uTiling = val; }
112
113 /// \return The U scale for this texture.
114 float UTiling() const { return _uTiling; }
115
116 /// Sets the V scale for this texture.
117 /// \param val The new V scale to set.
118 void VTiling( float val ) { _vTiling = val; }
119
120 /// \return The V scale for this texture.
121 float VTiling() const { return _vTiling; }
122
123 /// Set the rotation angle in degrees for this texture.
124 /// \param val The new rotation angle to set.
125 void Angle( float val ) { _angle = val; }
126
127 /// \return The rotation angle for this texture.
128 float Angle() const { return _angle; }
129
130 /// Should be called after changing the parameters.
132
133 /// \return True if the matrix is identity.
134 bool IsIdentity() { return _isIdentity; }
135
136 /// \note Matrix must be an array of [16].
137 /// \return The underlying matrix data.
138 float* GetTransformMatrix() { return _matrix.Data(); }
139 };
140
141protected:
142 unsigned int _ref_count; ///< Reference count
143
144#ifdef GLES20
145 GlsEffect* _shader; /**< The current active effect in the system. If NULL, then no effect is active.
146 * Effects are retrieved from the GlsEffectFactory class. */
147 bool _userHasCustomShader; /** whether or not the user already had a custom shader set up */
148#elif !defined( GLES )
149 MaxLike_Shader* _shader; ///< shader program to use (if any)
150#endif
151
152 unsigned int _materialIndex; ///< The material index to use
153 int _diffuseTextureIndex; ///< INVALID_INDEX, or the texture index to use
154 int _normalTextureIndex; ///< INVALID_INDEX, or the texture index to use
155 int _specularTextureIndex; ///< INVALID_INDEX, or the texture index to use
156 int _reflectionTextureIndex; ///< INVALID_INDEX, or the texture index to use
157
158 float _diffuseAmount; ///< [0.0,1.0] "Weight" of the diffuse map
159 float _normalAmount; ///< [0.0,1.0] "Weight" of the normal map
160 float _specularAmount; ///< [0.0,1.0] "Weight" of the specular map
161 float _reflectionAmount; ///< [0.0,1.0] "Weight" of the reflection map
162
163 bool _useVertexColors; ///< true: use vertex color for diffuse rather than material diffuse
164
165 /// true: expect 'DirectX' format normal maps (positive Green points down)
166 /// false: expect 'OpenGL' format normal maps (positive Green points up)
167 /// Note: the sense is backwards from the Max 'Normal Bump' 'Flip Green' option because
168 /// Max defaults to 'DirectX' format and GL Studio defaults to 'OpenGL' format
170
171 DistiAttribDict* _attribDict; ///< The attribute dictionary for this object.
172
173 TextureUVWMatrix _diffuseUVWMatrix; ///< The texture transform for the diffuse texture.
174 TextureUVWMatrix _normalUVWMatrix; ///< The texture transform for the normal texture.
175 TextureUVWMatrix _specularUVWMatrix; ///< The texture transform for the specular texture.
176
177 /// Called to add this object's attributes to the dictionary.
178 /// \note Not normally called by users.
180
181public:
182#ifdef GLES20
183 static const GLenum NORMAL_MAP_TEXTURE_UNIT = GL_TEXTURE1; ///< the texture unit that the normal map should be bound to, \see glActiveTexture
184 static const GLenum SPECULAR_MAP_TEXTURE_UNIT = GL_TEXTURE2; ///< the texture unit that the specular map should be bound to, \see glActiveTexture
185 static const GLenum REFLECTION_MAP_TEXTURE_UNIT = GL_TEXTURE3; ///< the texture unit that the reflection map should be bound to, \see glActiveTexture
186
187 /** Get the index for the sampler uniform for the given texture unit
188 * \param textureUnit the texture unit (e.g. GL_TEXTURE1)
189 * \return the index for the sampler uniform
190 */
191 static unsigned int TextureUnitIndex( GLenum textureUnit ) { return textureUnit - GL_TEXTURE0; }
192#endif // GLES20
193
194 static const int INVALID_INDEX = -1; ///< Value to represent an invalid texture index.
195
196 GLSGEN_GlsAdvancedMesh_EXPORT Effect_DiffNormSpecRefl();
197 GLSGEN_GlsAdvancedMesh_EXPORT ~Effect_DiffNormSpecRefl();
198
199 /// Copy constructor
200 GLSGEN_GlsAdvancedMesh_EXPORT Effect_DiffNormSpecRefl( const Effect_DiffNormSpecRefl& );
201
202 /// Assignment operator
203 /// \return the resulting object (this)
204 GLSGEN_GlsAdvancedMesh_EXPORT const Effect_DiffNormSpecRefl& operator=( const Effect_DiffNormSpecRefl& );
205
206 /// Equality operator
207 /// \return Whether or not the objects are equal.
208 GLSGEN_GlsAdvancedMesh_EXPORT bool operator==( const Effect_DiffNormSpecRefl& ) const;
209
210 /// Inequality operator
211 /// \param o The object to compare.
212 /// \return Whether or not the objects are not equal.
213 bool operator!=( const Effect_DiffNormSpecRefl& o ) const { return !( *this == o ); }
214
215 /// Set the material index for this effect.
216 /// \param materialIndex The new material index for this effect.
217 void SetMaterialIndex( unsigned int materialIndex ) { _materialIndex = materialIndex; }
218
219 /// \return The current material index for this effect.
220 unsigned int GetMaterialIndex() const { return _materialIndex; }
221
222 /// Set whether or not to use vertex colors, rather than material colors.
223 /// \param value The new value to set.
224 void SetUseVertexColor( bool value )
225 {
226 _useVertexColors = value;
227#ifndef GLES
228 SelectShader();
229#endif
230 }
231
232 /// \return Whether the effect is using vertex colors, rather than material colors.
233 bool GetUseVertexColor() const { return _useVertexColors; }
234
235 /// Set the texture index that will provide the diffuse color for the effect.
236 /// \param textureIndex The new texture index to set.
237 void SetDiffuseTextureIndex( int textureIndex )
238 {
239 _diffuseTextureIndex = textureIndex;
240#ifndef GLES
241 SelectShader();
242#endif
243 }
244
245 /// \return The current diffuse color texture index for this effect.
247
248 /// Set the texture index that will provide normals for the effect
249 /// \param textureIndex The new texture index to set.
250 void SetNormalTextureIndex( int textureIndex )
251 {
252 _normalTextureIndex = textureIndex;
253#ifndef GLES
254 SelectShader();
255#endif
256 }
257
258 /// \return The current normal texture index for this effect.
260
261 /// Set the texture index that will provide specular for this effect.
262 /// \param textureIndex The new texture index to set.
263 void SetSpecularTextureIndex( int textureIndex )
264 {
265 _specularTextureIndex = textureIndex;
266#ifndef GLES
267 SelectShader();
268#endif
269 }
270
271 /// \returns The current specular texture index for this effect.
273
274 /// Set the texture index that will provide reflections for this effect.
275 /// \param textureIndex The new texture index to set.
276 void SetReflectionTextureIndex( int textureIndex )
277 {
278 _reflectionTextureIndex = textureIndex;
279#ifndef GLES
280 SelectShader();
281#endif
282 }
283
284 /// \returns The current reflection texture index for this effect.
286
287 /// Set the weight of the diffuse texture from 0.0 to 1.0.
288 /// \param value The new weight to set.
289 void SetDiffuseAmount( float value )
290 {
291 _diffuseAmount = value;
292#ifndef GLES
293 SelectShader();
294#endif
295 }
296
297 /// \return The current weight for the diffuse texture.
298 float GetDiffuseAmount() const { return _diffuseAmount; }
299
300 /// Set the weight of the normal texture from 0.0 to 1.0.
301 /// \param value The new weight to set.
302 void SetNormalAmount( float value )
303 {
304 _normalAmount = value;
305#ifndef GLES
306 SelectShader();
307#endif
308 }
309
310 /// \return The current weight for the normal texture.
311 float GetNormalAmount() const { return _normalAmount; }
312
313 /// Set the weight of the specular texture from 0.0 to 1.0.
314 /// \param value The new weight to set.
315 void SetSpecularAmount( float value )
316 {
317 _specularAmount = value;
318#ifndef GLES
319 SelectShader();
320#endif
321 }
322
323 /// \return The current weight for the specular texture.
324 float GetSpecularAmount() const { return _specularAmount; }
325
326 /// Set the weight of the reflection texture from 0.0 to 1.0.
327 /// \param value The new weight to set.
328 void SetReflectionAmount( float value )
329 {
330 _reflectionAmount = value;
331#ifndef GLES
332 SelectShader();
333#endif
334 }
335
336 /// \return The current weight for the reflection texture.
337 float GetReflectionAmount() const { return _reflectionAmount; }
338
339 /// Set flipping the normal map green channel for DirectX textures (true) or OpenGL textures (false).
340 /// \param value The new flip value.
341 void SetNormalMapFlipGreen( bool value )
342 {
343 _normalMapFlipGreen = value;
344#ifndef GLES
345 SelectShader();
346#endif
347 }
348
349 /// \return The current normal map green channel flip: true for DirectX textures, false for OpenGL textures.
351
352 /// Set Diffuse Map UV transform parameters.
353 /// \note Scaling and rotation are performed from the center of the texture.
354 /// \param uOffset U axis translation.
355 /// \param vOffset V axis translation.
356 /// \param uTiling U axis scaling.
357 /// \param vTiling V axis scaling.
358 /// \param angle X axis rotation in degrees.
359 GLSGEN_GlsAdvancedMesh_EXPORT void SetDiffuseUVWSettings( float uOffset, float vOffset, float uTiling, float vTiling, float angle );
360
361 /// Get Diffuse Map UV transform parameters.
362 /// \param uOffset Returned u axis translation.
363 /// \param vOffset Returned v axis translation.
364 /// \param uTiling Returned u axis scaling.
365 /// \param vTiling Returned v axis scaling.
366 /// \param angle Returned x axis rotation in degrees.
367 GLSGEN_GlsAdvancedMesh_EXPORT void GetDiffuseUVWSettings( float& uOffset, float& vOffset, float& uTiling, float& vTiling, float& angle );
368
369 /// Set Normal Map UV transform parameters.
370 /// \note Scaling and rotation are performed from the center of the texture.
371 /// \param uOffset U axis translation.
372 /// \param vOffset V axis translation.
373 /// \param uTiling U axis scaling.
374 /// \param vTiling V axis scaling.
375 /// \param angle W-axis rotation in degrees.
376 GLSGEN_GlsAdvancedMesh_EXPORT void SetNormalUVWSettings( float uOffset, float vOffset, float uTiling, float vTiling, float angle );
377
378 /// Get Normal Map UV transform parameters.
379 /// \param uOffset Returned u axis translation.
380 /// \param vOffset Returned v axis translation.
381 /// \param uTiling Returned u axis scaling.
382 /// \param vTiling Returned v axis scaling.
383 /// \param angle Returned W-axis rotation in degrees.
384 GLSGEN_GlsAdvancedMesh_EXPORT void GetNormalUVWSettings( float& uOffset, float& vOffset, float& uTiling, float& vTiling, float& angle );
385
386 /// Set Specular Map UV transform parameters.
387 /// \note Scaling and rotation are performed from the center of the texture.
388 /// \param uOffset U axis translation.
389 /// \param vOffset V axis translation.
390 /// \param uTiling U axis scaling.
391 /// \param vTiling V axis scaling.
392 /// \param angle W-axis rotation in degrees.
393 GLSGEN_GlsAdvancedMesh_EXPORT void SetSpecularUVWSettings( float uOffset, float vOffset, float uTiling, float vTiling, float angle );
394
395 /// Get Specular Map UV transform parameters.
396 /// \param uOffset Returned u axis translation.
397 /// \param vOffset Returned v axis translation.
398 /// \param uTiling Returned u axis scaling.
399 /// \param vTiling Returned v axis scaling.
400 /// \param angle Returned W-axis rotation in degrees.
401 GLSGEN_GlsAdvancedMesh_EXPORT void GetSpecularUVWSettings( float& uOffset, float& vOffset, float& uTiling, float& vTiling, float& angle );
402
403 /// Selects the shader to use based on the current effect parameters.
404 /// \note Not normally called by users.
405 GLSGEN_GlsAdvancedMesh_EXPORT void SelectShader();
406
407 /// Recalculate the texture transform matrices.
408 /// \note Not normally called by users.
409 GLSGEN_GlsAdvancedMesh_EXPORT void TextureUVWSettingsChanged();
410
411 /// \return true if the effect has non-default texture transform settings
412 /// \note Not normally called by users.
413 GLSGEN_GlsAdvancedMesh_EXPORT bool UsesTextureTransforms();
414
415 /// \return A reference to the effect's attribute dictionary.
417 {
418 if( !_attribDict )
419 {
421 }
422 return *_attribDict;
423 }
424
425 /// \return This effect's type as a readable string.
427 {
428 return EFFECT_TYPE_NAME;
429 }
430
431 /////////////////////////////////////////////
432 // VertexAttribIndexLookup Interface
433 /////////////////////////////////////////////
434
435 /// \copydoc VertexAttribIndexLookup::GetVertexAttribIndexForSemantic
437
438 ///////////////////////////////////////////////////////////////////////////
439 // GlsRenderEffect overrides
440 ///////////////////////////////////////////////////////////////////////////
441 /// \copydoc GlsRenderEffect::AddRef
443
444 /// \copydoc GlsRenderEffect::Release
446
447 /// \copydoc GlsRenderEffect::GlsRenderEffect_ClassID
449
450 /// \copydoc GlsRenderEffect::SetupEffect
452 DynamicArray<Material>& materialPalette,
453 TexturePalette* texturePalette,
454 const TextureSettings& textureSettings,
455 float* viewToWorld3x3, // 3x3 matrix (float[9])
456 unsigned int maxLightNum,
457 unsigned int activeLightMask ) DISTI_METHOD_OVERRIDE;
458
459 /// Remove the effect from the OpenGL state.
461
462 /// \copydoc GlsRenderEffect::Compare
464
465 /// \copydoc GlsRenderEffect::Clone
467
468 /// \copydoc GlsRenderEffect::GetReferencedTextures
470
471 /// \copydoc GlsRenderEffect::GetReferencedMaterials
473};
474
475} // namespace disti
476
477#endif
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
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)
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