![]() |
Public API Reference |
![]() |
OpenGL state cache. More...
#include <csplugincommon/opengl/glstates.h>
Public Member Functions | |
void | ActivateImageUnit () |
Activate the currently selected image unit. | |
void | ActivateTCUnit (uint usage) |
Activate the currently selected coordinate set. | |
GLuint | GetBufferARB (GLenum target) |
Get the currently bound VBO/PBO buffer. | |
int | GetCurrentImageUnit () |
Query active image unit. | |
int | GetCurrentTCUnit () |
Query active texture coordinate set. | |
GLint | GetNumImageUnits () const |
Query the number of texture image units supported by OpenGL. | |
GLint | GetNumTexCoords () const |
Query the number of texture coordinate sets supported by OpenGL. | |
void | SetBufferARB (GLenum target, GLuint id, bool applyNow=false) |
Bind a given VBO/PBO buffer. | |
void | SetCurrentImageUnit (int unit) |
Select the currently active image unit. | |
void | SetCurrentTCUnit (int unit) |
Select the currently active texture coordinate unit. | |
Blend functions | |
void | SetBlendFunc (GLenum blend_source, GLenum blend_destination, bool forced=false) |
void | GetBlendFunc (GLenum &blend_source, GLenum &blend_destination) const |
void | SetBlendFuncSeparate (GLenum blend_sourceRGB, GLenum blend_destinationRGB, GLenum blend_sourceA, GLenum blend_destinationA, bool forced=false) |
void | GetBlendFuncSeparate (GLenum &blend_sourceRGB, GLenum &blend_destinationRGB, GLenum &blend_sourceA, GLenum &blend_destinationA) const |
Pixel storage | |
GLint | GetPixelUnpackAlignment () |
void | SetPixelUnpackAlignment (GLint alignment) |
bool | GetPixelUnpackSwapBytes () |
void | SetPixelUnpackSwapBytes (GLint swap) |
Clamp control | |
void | SetClampColor (GLenum target, GLenum clamp) |
GLenum | GetClampColor (GLenum target) const |
Static Public Attributes | |
static const int | activateMatrix = 1 << texServer |
Flag that the active TU should be used when changing the texture matrix. | |
static const int | activateTexCoord = 1 << texClient |
Flag that the active TU should be used for setting texture coords. | |
static const int | activateTexEnv = 1 << texServer |
Flag that the active TU should be used when changing the texture environment. | |
static const int | activateTexGen = 1 << texServer |
Flag that the active TU should be used when changing the texture coord generation parameters. |
OpenGL state cache.
All state changes that are made often (possibly with the same value, ie actually no change) or across plugins should be done through the cache.
Definition at line 623 of file glstates.h.
void csGLStateCache::ActivateImageUnit | ( | ) | [inline] |
Activate the currently selected image unit.
Use this to bind textures.
Definition at line 744 of file glstates.h.
void csGLStateCache::ActivateTCUnit | ( | uint | usage | ) | [inline] |
Activate the currently selected coordinate set.
Definition at line 789 of file glstates.h.
GLuint csGLStateCache::GetBufferARB | ( | GLenum | target | ) | [inline] |
Get the currently bound VBO/PBO buffer.
Definition at line 838 of file glstates.h.
int csGLStateCache::GetCurrentImageUnit | ( | ) | [inline] |
Query active image unit.
Definition at line 734 of file glstates.h.
int csGLStateCache::GetCurrentTCUnit | ( | ) | [inline] |
Query active texture coordinate set.
Definition at line 769 of file glstates.h.
GLint csGLStateCache::GetNumImageUnits | ( | ) | const [inline] |
Query the number of texture image units supported by OpenGL.
Definition at line 948 of file glstates.h.
GLint csGLStateCache::GetNumTexCoords | ( | ) | const [inline] |
Query the number of texture coordinate sets supported by OpenGL.
Definition at line 950 of file glstates.h.
void csGLStateCache::SetBufferARB | ( | GLenum | target, |
GLuint | id, | ||
bool | applyNow = false |
||
) | [inline] |
Bind a given VBO/PBO buffer.
Definition at line 825 of file glstates.h.
void csGLStateCache::SetCurrentImageUnit | ( | int | unit | ) | [inline] |
Select the currently active image unit.
Definition at line 728 of file glstates.h.
void csGLStateCache::SetCurrentTCUnit | ( | int | unit | ) | [inline] |
Select the currently active texture coordinate unit.
Use this to change state of texture coordinate arrays, change texture matrices, texture environments, texture coord generation and enabling/disabling textures.
Definition at line 763 of file glstates.h.
const int csGLStateCache::activateMatrix = 1 << texServer [static] |
Flag that the active TU should be used when changing the texture matrix.
Definition at line 776 of file glstates.h.
const int csGLStateCache::activateTexCoord = 1 << texClient [static] |
Flag that the active TU should be used for setting texture coords.
Definition at line 774 of file glstates.h.
const int csGLStateCache::activateTexEnv = 1 << texServer [static] |
Flag that the active TU should be used when changing the texture environment.
Definition at line 778 of file glstates.h.
const int csGLStateCache::activateTexGen = 1 << texServer [static] |
Flag that the active TU should be used when changing the texture coord generation parameters.
Definition at line 783 of file glstates.h.