|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CDriverGLStates Class ReferenceClass for optimizing calls to openGL states, by caching old ones.
More...
#include <driver_opengl_states.h>
List of all members.
Texture Mode setting. |
enum | TTextureMode { TextureDisabled,
Texture2D,
TextureCubeMap,
TextureModeCount
} |
void | activeTextureARB (uint stage) |
| same as glActiveTextureARB(). usefull for setTextureMode. More...
|
void | forceActiveTextureARB (uint stage) |
| same as active texture arb, but with no cache check. More...
|
uint | getActiveTextureARB () const |
| get active texture. More...
|
void | setTextureMode (TTextureMode texMode) |
| change if needed the texture mode of the current active Texture ARB. More...
|
void | resetTextureMode () |
Public Types |
Public Methods |
| CDriverGLStates () |
| Constructor. no-op. More...
|
void | init (bool supportTextureCubeMap) |
void | forceDefaults (uint nbTextureStages) |
| Reset all OpenGL states of interest to default, and update caching. More...
|
void | blendFunc (GLenum src, GLenum dst) |
| glBlendFunc. More...
|
void | depthFunc (GLenum zcomp) |
| glDepthFunc. More...
|
void | alphaFunc (float threshold) |
| glAlphaFunc. More...
|
|
void | enableBlend (uint enable) |
void | enableCullFace (uint enable) |
void | enableAlphaTest (uint enable) |
| enable and set good AlphaFunc. More...
|
void | enableLighting (uint enable) |
void | enableZWrite (uint enable) |
|
void | setEmissive (uint32 packedColor, const GLfloat color[4]) |
void | setAmbient (uint32 packedColor, const GLfloat color[4]) |
void | setDiffuse (uint32 packedColor, const GLfloat color[4]) |
void | setSpecular (uint32 packedColor, const GLfloat color[4]) |
void | setShininess (float shin) |
void | setVertexColorLighted (bool enable) |
void | setDepthRange (float zDelta) |
void | enableTexGen (uint stage, bool enable) |
void | setTexGenMode (uint stage, GLint mode) |
|
void | enableVertexArray (bool enable) |
void | enableNormalArray (bool enable) |
void | enableWeightArray (bool enable) |
void | enableColorArray (bool enable) |
void | enableSecondaryColorArray (bool enable) |
void | clientActiveTextureARB (uint stage) |
| same as glClientActiveTextureARB(). usefull for enableTexCoordArray. More...
|
void | enableTexCoordArray (bool enable) |
| NB: caller must call correct clientActiveTextureARB() before. More...
|
void | enableVertexAttribArray (uint glIndex, bool enable) |
| For vertexProgram. More...
|
void | enableVertexAttribArrayForEXTVertexShader (uint glIndex, bool enable, uint *variants) |
| Same as enableVertexAttribArray, but for EXTVertexShader (need variant ID). More...
|
Private Attributes |
bool | _CurBlend |
bool | _CurCullFace |
bool | _CurAlphaTest |
bool | _CurLighting |
bool | _CurZWrite |
GLenum | _CurBlendSrc |
GLenum | _CurBlendDst |
GLenum | _CurDepthFunc |
float | _CurAlphaTestThreshold |
uint32 | _CurEmissive |
uint32 | _CurAmbient |
uint32 | _CurDiffuse |
uint32 | _CurSpecular |
float | _CurShininess |
bool | _VertexColorLighted |
bool | _TextureCubeMapSupported |
uint | _CurrentActiveTextureARB |
TTextureMode | _TextureMode [8] |
bool | _VertexArrayEnabled |
bool | _NormalArrayEnabled |
bool | _WeightArrayEnabled |
bool | _ColorArrayEnabled |
bool | _SecondaryColorArrayEnabled |
uint | _CurrentClientActiveTextureARB |
bool | _TexCoordArrayEnabled [8] |
bool | _VertexAttribArrayEnabled [CVertexBuffer::NumValue] |
bool | _TexGen [8] |
GLint | _TexGenMode [8] |
float | _CurZRangeDelta |
Detailed Description
Class for optimizing calls to openGL states, by caching old ones.
All following call with OpenGL must be done with only one instance of this class:
- glEnable() glDisable() with:
- GL_BLEND
- GL_CULL_FACE
- GL_ALPHA_TEST
- GL_LIGHTING
- GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP_ARB.
- GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R
- GL_COLOR_MATERIAL
- glActiveTextureARB()
- glClientActiveTextureARB()
- glEnableClientState() glDisableClientState() with:
- GL_VERTEX_ARRAY
- GL_NORMAL_ARRAY
- GL_VERTEX_WEIGHTING_EXT
- GL_COLOR_ARRAY
- GL_SECONDARY_COLOR_ARRAY_EXT
- GL_TEXTURE_COORD_ARRAY
- GL_VERTEX_ATTRIB_ARRAY0_NV + i.
- glDepthMask()
- glAlphaFunc()
- glBlendFunc()
- glDepthFunc()
- glMaterialf() and glMaterialfv() for:
- GL_EMISSION
- GL_AMBIENT
- GL_DIFFUSE
- GL_SPECULAR
- GL_SHININESS
- glDepthRange()
- glColorMaterial()
- glTexGeni()
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 78 of file driver_opengl_states.h.
Member Enumeration Documentation
enum NL3D::CDriverGLStates::TTextureMode
|
|
Constructor & Destructor Documentation
NL3D::CDriverGLStates::CDriverGLStates |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CDriverGLStates::activeTextureARB |
( |
uint |
stage |
) |
|
|
void NL3D::CDriverGLStates::alphaFunc |
( |
float |
threshold |
) |
|
|
void NL3D::CDriverGLStates::blendFunc |
( |
GLenum |
src, |
|
|
GLenum |
dst |
|
) |
|
|
void NL3D::CDriverGLStates::clientActiveTextureARB |
( |
uint |
stage |
) |
|
|
void NL3D::CDriverGLStates::depthFunc |
( |
GLenum |
zcomp |
) |
|
|
void NL3D::CDriverGLStates::enableAlphaTest |
( |
uint |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableBlend |
( |
uint |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableColorArray |
( |
bool |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableCullFace |
( |
uint |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableLighting |
( |
uint |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableNormalArray |
( |
bool |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableSecondaryColorArray |
( |
bool |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableTexCoordArray |
( |
bool |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableTexGen |
( |
uint |
stage, |
|
|
bool |
enable |
|
) |
|
|
void NL3D::CDriverGLStates::enableVertexArray |
( |
bool |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableVertexAttribArray |
( |
uint |
glIndex, |
|
|
bool |
enable |
|
) |
|
|
void NL3D::CDriverGLStates::enableVertexAttribArrayForEXTVertexShader |
( |
uint |
glIndex, |
|
|
bool |
enable, |
|
|
uint * |
variants |
|
) |
|
|
void NL3D::CDriverGLStates::enableWeightArray |
( |
bool |
enable |
) |
|
|
void NL3D::CDriverGLStates::enableZWrite |
( |
uint |
enable |
) |
|
|
void NL3D::CDriverGLStates::forceActiveTextureARB |
( |
uint |
stage |
) |
|
|
void NL3D::CDriverGLStates::forceDefaults |
( |
uint |
nbTextureStages |
) |
|
|
|
Reset all OpenGL states of interest to default, and update caching.
Definition at line 67 of file driver_opengl_states.cpp.
References _CurAlphaTest, _CurAlphaTestThreshold, _CurAmbient, _CurBlend, _CurBlendDst, _CurBlendSrc, _CurCullFace, _CurDepthFunc, _CurDiffuse, _CurEmissive, _CurLighting, _CurrentActiveTextureARB, _CurrentClientActiveTextureARB, _CurShininess, _CurSpecular, _CurZRangeDelta, _CurZWrite, _TexGen, _TexGenMode, _TextureMode, _VertexColorLighted, nglActiveTextureARB, nglClientActiveTextureARB, and TextureDisabled. |
uint NL3D::CDriverGLStates::getActiveTextureARB |
( |
|
) |
const [inline] |
|
void NL3D::CDriverGLStates::init |
( |
bool |
supportTextureCubeMap |
) |
|
|
void NL3D::CDriverGLStates::resetTextureMode |
( |
|
) |
|
|
void NL3D::CDriverGLStates::setAmbient |
( |
uint32 |
packedColor, |
|
|
const GLfloat |
color[4] |
|
) |
|
|
void NL3D::CDriverGLStates::setDepthRange |
( |
float |
zDelta |
) |
|
|
void NL3D::CDriverGLStates::setDiffuse |
( |
uint32 |
packedColor, |
|
|
const GLfloat |
color[4] |
|
) |
|
|
void NL3D::CDriverGLStates::setEmissive |
( |
uint32 |
packedColor, |
|
|
const GLfloat |
color[4] |
|
) |
|
|
void NL3D::CDriverGLStates::setShininess |
( |
float |
shin |
) |
|
|
void NL3D::CDriverGLStates::setSpecular |
( |
uint32 |
packedColor, |
|
|
const GLfloat |
color[4] |
|
) |
|
|
void NL3D::CDriverGLStates::setTexGenMode |
( |
uint |
stage, |
|
|
GLint |
mode |
|
) |
|
|
void NL3D::CDriverGLStates::setTextureMode |
( |
TTextureMode |
texMode |
) |
|
|
void NL3D::CDriverGLStates::setVertexColorLighted |
( |
bool |
enable |
) |
|
|
Member Data Documentation
bool NL3D::CDriverGLStates::_ColorArrayEnabled [private]
|
|
bool NL3D::CDriverGLStates::_CurAlphaTest [private]
|
|
float NL3D::CDriverGLStates::_CurAlphaTestThreshold [private]
|
|
uint32 NL3D::CDriverGLStates::_CurAmbient [private]
|
|
bool NL3D::CDriverGLStates::_CurBlend [private]
|
|
GLenum NL3D::CDriverGLStates::_CurBlendDst [private]
|
|
GLenum NL3D::CDriverGLStates::_CurBlendSrc [private]
|
|
bool NL3D::CDriverGLStates::_CurCullFace [private]
|
|
GLenum NL3D::CDriverGLStates::_CurDepthFunc [private]
|
|
uint32 NL3D::CDriverGLStates::_CurDiffuse [private]
|
|
uint32 NL3D::CDriverGLStates::_CurEmissive [private]
|
|
bool NL3D::CDriverGLStates::_CurLighting [private]
|
|
uint NL3D::CDriverGLStates::_CurrentActiveTextureARB [private]
|
|
uint NL3D::CDriverGLStates::_CurrentClientActiveTextureARB [private]
|
|
float NL3D::CDriverGLStates::_CurShininess [private]
|
|
uint32 NL3D::CDriverGLStates::_CurSpecular [private]
|
|
float NL3D::CDriverGLStates::_CurZRangeDelta [private]
|
|
bool NL3D::CDriverGLStates::_CurZWrite [private]
|
|
bool NL3D::CDriverGLStates::_NormalArrayEnabled [private]
|
|
bool NL3D::CDriverGLStates::_SecondaryColorArrayEnabled [private]
|
|
bool NL3D::CDriverGLStates::_TexCoordArrayEnabled[8] [private]
|
|
bool NL3D::CDriverGLStates::_TexGen[8] [private]
|
|
GLint NL3D::CDriverGLStates::_TexGenMode[8] [private]
|
|
bool NL3D::CDriverGLStates::_TextureCubeMapSupported [private]
|
|
TTextureMode NL3D::CDriverGLStates::_TextureMode[8] [private]
|
|
bool NL3D::CDriverGLStates::_VertexArrayEnabled [private]
|
|
bool NL3D::CDriverGLStates::_VertexAttribArrayEnabled[CVertexBuffer::NumValue] [private]
|
|
bool NL3D::CDriverGLStates::_VertexColorLighted [private]
|
|
bool NL3D::CDriverGLStates::_WeightArrayEnabled [private]
|
|
The documentation for this class was generated from the following files:
|
|