#include <vtkOpenGLStateCache.h>
Collaboration diagram for vtkOpenGLStateCache:

This simply checks for redundancies in state-change requests and only calls the real OpenGL call if there has in fact been a change. This cannot, however, fix problems with the ordering of calls.
Definition at line 95 of file vtkOpenGLStateCache.h.
Public Member Functions | |
| vtkOpenGLStateCache () | |
| ~vtkOpenGLStateCache () | |
| void | Initialize () |
| void | glEnable (GLenum e) |
| void | glDisable (GLenum e) |
| void | glAlphaFunc (GLenum e, GLclampf cf) |
| void | glBlendFunc (GLenum e, GLenum e1) |
| void | glDepthFunc (GLenum e) |
| void | glTexEnvf (GLenum e, GLenum e1, GLfloat f) |
| void | glLightModeli (GLenum e, GLint i) |
| void | glLightModelfv (GLenum e, GLfloat *fv) |
| void | glLightfv (GLenum light, GLenum pname, const GLfloat *params) |
| void | glLightf (GLenum light, GLenum pname, GLfloat f) |
| void | glLighti (GLenum light, GLenum pname, GLint f) |
| void | glMaterialfv (GLenum face, GLenum pname, const GLfloat *params) |
| void | glShadeModel (GLenum e) |
| void | glClearColor (GLclampf r, GLclampf g, GLclampf b, GLclampf a) |
| void | glClearDepth (GLclampd d) |
| void | glDepthMask (GLenum e) |
| void | glCullFace (GLenum e) |
| void | glClear (GLbitfield b) |
| void | glDrawBuffer (GLenum e) |
| void | glMatrixMode (GLenum e) |
| void | glViewport (GLint llx, GLint lly, GLint u, GLint v) |
| void | glScissor (GLint llx, GLint lly, GLint u, GLint v) |
| void | glClipPlane (GLenum e, const GLdouble *eqn) |
| void | glColorMaterial (GLenum face, GLenum mode) |
| void | glPointSize (GLfloat f) |
| void | glLineWidth (GLfloat f) |
| void | glLineStipple (GLint factor, GLushort pattern) |
| void | glDepthRange (GLclampd nearval, GLclampd farval) |
Public Attributes | |
| char | Enable_buckets [0xDE1-0xB10+1] |
| char | Enable_GL_LIGHT_buckets [8] |
| char | Enable_GL_CLIP_PLANE_buckets [8] |
| GLclampf | AlphaFunc_bucket |
| GLenum | BlendFunc_bucket |
| GLenum | DepthFunc_bucket |
| GLfloat | TexEnvf_MODE_bucket |
| GLint | LightModeli_LIGHT_MODEL_TWO_SIDE_bucket |
| GLfloat | LightModelfv_LIGHT_MODEL_AMBIENT_bucket [3] |
| GLfloat | Lightfv_buckets [8 *4 *8] |
| GLfloat | Lightf_buckets [8 *8] |
| GLint | Lighti_SPOT_CUTOFF_buckets [8] |
| GLfloat | Materialfv_buckets [8 *8 *4] |
| GLenum | ShadeModel_bucket |
| GLclampf | ClearColor_buckets [4] |
| GLclampd | ClearDepth_bucket |
| GLclampf | DepthMask_bucket |
| GLenum | CullFace_bucket |
| GLenum | DrawBuffer_bucket |
| GLenum | MatrixMode_bucket |
| GLint | Viewport_bucket [4] |
| GLint | Scissor_bucket [4] |
| GLdouble | ClipPlane_bucket [4 *GL_MAX_CLIP_PLANES] |
| GLenum | ColorMaterial_bucket [8] |
| GLfloat | PointSize_bucket |
| GLfloat | LineWidth_bucket |
| GLint | LineStipple_FACTOR_bucket |
| GLushort | LineStipple_PATTERN_bucket |
| GLclampd | DepthRange_NEAR_bucket |
| GLclampd | DepthRange_FAR_bucket |
Static Public Attributes | |
| static vtkOpenGLStateCache * | CurrentGLCache |
| vtkOpenGLStateCache::vtkOpenGLStateCache | ( | ) |
| vtkOpenGLStateCache::~vtkOpenGLStateCache | ( | ) |
| void vtkOpenGLStateCache::Initialize | ( | ) |
| void vtkOpenGLStateCache::glEnable | ( | GLenum | e | ) | [inline] |
Definition at line 128 of file vtkOpenGLStateCache.h.
References Enable_buckets, Enable_GL_CLIP_PLANE_buckets, and Enable_GL_LIGHT_buckets.
| void vtkOpenGLStateCache::glDisable | ( | GLenum | e | ) | [inline] |
Definition at line 163 of file vtkOpenGLStateCache.h.
References Enable_buckets, Enable_GL_CLIP_PLANE_buckets, and Enable_GL_LIGHT_buckets.
| void vtkOpenGLStateCache::glAlphaFunc | ( | GLenum | e, | |
| GLclampf | cf | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glBlendFunc | ( | GLenum | e, | |
| GLenum | e1 | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glDepthFunc | ( | GLenum | e | ) | [inline] |
| void vtkOpenGLStateCache::glTexEnvf | ( | GLenum | e, | |
| GLenum | e1, | |||
| GLfloat | f | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glLightModeli | ( | GLenum | e, | |
| GLint | i | |||
| ) | [inline] |
Definition at line 251 of file vtkOpenGLStateCache.h.
References LightModeli_LIGHT_MODEL_TWO_SIDE_bucket.
| void vtkOpenGLStateCache::glLightModelfv | ( | GLenum | e, | |
| GLfloat * | fv | |||
| ) | [inline] |
Definition at line 262 of file vtkOpenGLStateCache.h.
References LightModelfv_LIGHT_MODEL_AMBIENT_bucket.
| void vtkOpenGLStateCache::glLightfv | ( | GLenum | light, | |
| GLenum | pname, | |||
| const GLfloat * | params | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glLightf | ( | GLenum | light, | |
| GLenum | pname, | |||
| GLfloat | f | |||
| ) | [inline] |
Definition at line 307 of file vtkOpenGLStateCache.h.
References Lightf_buckets, and Lighti_SPOT_CUTOFF_buckets.
| void vtkOpenGLStateCache::glLighti | ( | GLenum | light, | |
| GLenum | pname, | |||
| GLint | f | |||
| ) | [inline] |
Definition at line 322 of file vtkOpenGLStateCache.h.
References Lightf_buckets, and Lighti_SPOT_CUTOFF_buckets.
| void vtkOpenGLStateCache::glMaterialfv | ( | GLenum | face, | |
| GLenum | pname, | |||
| const GLfloat * | params | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glShadeModel | ( | GLenum | e | ) | [inline] |
| void vtkOpenGLStateCache::glClearColor | ( | GLclampf | r, | |
| GLclampf | g, | |||
| GLclampf | b, | |||
| GLclampf | a | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glClearDepth | ( | GLclampd | d | ) | [inline] |
| void vtkOpenGLStateCache::glDepthMask | ( | GLenum | e | ) | [inline] |
| void vtkOpenGLStateCache::glCullFace | ( | GLenum | e | ) | [inline] |
| void vtkOpenGLStateCache::glClear | ( | GLbitfield | b | ) | [inline] |
Definition at line 444 of file vtkOpenGLStateCache.h.
| void vtkOpenGLStateCache::glDrawBuffer | ( | GLenum | e | ) | [inline] |
| void vtkOpenGLStateCache::glMatrixMode | ( | GLenum | e | ) | [inline] |
| void vtkOpenGLStateCache::glViewport | ( | GLint | llx, | |
| GLint | lly, | |||
| GLint | u, | |||
| GLint | v | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glScissor | ( | GLint | llx, | |
| GLint | lly, | |||
| GLint | u, | |||
| GLint | v | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glClipPlane | ( | GLenum | e, | |
| const GLdouble * | eqn | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glColorMaterial | ( | GLenum | face, | |
| GLenum | mode | |||
| ) | [inline] |
| void vtkOpenGLStateCache::glPointSize | ( | GLfloat | f | ) | [inline] |
Definition at line 527 of file vtkOpenGLStateCache.h.
References PointSize_bucket.
Referenced by glLineWidth().
| void vtkOpenGLStateCache::glLineWidth | ( | GLfloat | f | ) | [inline] |
Definition at line 534 of file vtkOpenGLStateCache.h.
References glPointSize(), and LineWidth_bucket.
| void vtkOpenGLStateCache::glLineStipple | ( | GLint | factor, | |
| GLushort | pattern | |||
| ) | [inline] |
Definition at line 542 of file vtkOpenGLStateCache.h.
References LineStipple_FACTOR_bucket, and LineStipple_PATTERN_bucket.
| void vtkOpenGLStateCache::glDepthRange | ( | GLclampd | nearval, | |
| GLclampd | farval | |||
| ) | [inline] |
Definition at line 555 of file vtkOpenGLStateCache.h.
References DepthRange_FAR_bucket, and DepthRange_NEAR_bucket.
Definition at line 98 of file vtkOpenGLStateCache.h.
| char vtkOpenGLStateCache::Enable_buckets[0xDE1-0xB10+1] |
| GLfloat vtkOpenGLStateCache::Lightfv_buckets[8 *4 *8] |
| GLfloat vtkOpenGLStateCache::Lightf_buckets[8 *8] |
| GLfloat vtkOpenGLStateCache::Materialfv_buckets[8 *8 *4] |
| GLclampf vtkOpenGLStateCache::ClearColor_buckets[4] |
| GLint vtkOpenGLStateCache::Viewport_bucket[4] |
| GLint vtkOpenGLStateCache::Scissor_bucket[4] |
| GLdouble vtkOpenGLStateCache::ClipPlane_bucket[4 *GL_MAX_CLIP_PLANES] |
1.5.1