23 #ifndef VTK_IMPLEMENT_MESA_CXX
24 # include "vtkOpenGL.h"
27 #define vtkOpenGLCall_glEnable vtkOpenGLStateCache::CurrentGLCache->glEnable
28 #define vtkOpenGLCall_glDisable vtkOpenGLStateCache::CurrentGLCache->glDisable
29 #define vtkOpenGLCall_glAlphaFunc vtkOpenGLStateCache::CurrentGLCache->glAlphaFunc
30 #define vtkOpenGLCall_glBlendFunc vtkOpenGLStateCache::CurrentGLCache->glBlendFunc
31 #define vtkOpenGLCall_glDepthFunc vtkOpenGLStateCache::CurrentGLCache->glDepthFunc
32 #define vtkOpenGLCall_glTexEnvf vtkOpenGLStateCache::CurrentGLCache->glTexEnvf
33 #define vtkOpenGLCall_glLightModeli vtkOpenGLStateCache::CurrentGLCache->glLightModeli
34 #define vtkOpenGLCall_glLightModelfv vtkOpenGLStateCache::CurrentGLCache->glLightMOdelfv
35 #define vtkOpenGLCall_glLightfv vtkOpenGLStateCache::CurrentGLCache->glLightfv
36 #define vtkOpenGLCall_glLightf vtkOpenGLStateCache::CurrentGLCache->glLightf
37 #define vtkOpenGLCall_glLighti vtkOpenGLStateCache::CurrentGLCache->glLighti
38 #define vtkOpenGLCall_glMaterialfv vtkOpenGLStateCache::CurrentGLCache->glMaterialfv
39 #define vtkOpenGLCall_glShadeModel vtkOpenGLStateCache::CurrentGLCache->glShadeModel
40 #define vtkOpenGLCall_glClearColor vtkOpenGLStateCache::CurrentGLCache->glClearColor
41 #define vtkOpenGLCall_glClearDepth vtkOpenGLStateCache::CurrentGLCache->glClearDepth
42 #define vtkOpenGLCall_glDepthMask vtkOpenGLStateCache::CurrentGLCache->glDepthMask
43 #define vtkOpenGLCall_glCullFace vtkOpenGLStateCache::CurrentGLCache->glCullFace
44 #define vtkOpenGLCall_glClear vtkOpenGLStateCache::CurrentGLCache->glClear
45 #define vtkOpenGLCall_glDrawBuffer vtkOpenGLStateCache::CurrentGLCache->glDrawBuffer
46 #define vtkOpenGLCall_glMatrixMode vtkOpenGLStateCache::CurrentGLCache->glMatrixMode
47 #define vtkOpenGLCall_glViewport vtkOpenGLStateCache::CurrentGLCache->glViewport
48 #define vtkOpenGLCall_glScissor vtkOpenGLStateCache::CurrentGLCache->glScissor
49 #define vtkOpenGLCall_glClipPlane vtkOpenGLStateCache::CurrentGLCache->glClipPlane
50 #define vtkOpenGLCall_glColorMaterial vtkOpenGLStateCache::CurrentGLCache->glColorMaterial
51 #define vtkOpenGLCall_glPointSize vtkOpenGLStateCache::CurrentGLCache->glPointSize
52 #define vtkOpenGLCall_glLineWidth vtkOpenGLStateCache::CurrentGLCache->glLineWidth
53 #define vtkOpenGLCall_glLineStipple vtkOpenGLStateCache::CurrentGLCache->glLineStipple
54 #define vtkOpenGLCall_glDepthRange vtkOpenGLStateCache::CurrentGLCache->glDepthRange
55 #define vtkOpenGLCall_glPolygonOffset vtkOpenGLStateCache::CurrentGLCache->glPolygonOffset
57 #define vtkOpenGLCall_glPushMatrix glPushMatrix
58 #define vtkOpenGLCall_glPopMatrix glPopMatrix
59 #define vtkOpenGLCall_glMultMatrixd glMultMatrixd
60 #define vtkOpenGLCall_glLoadMatrixd glLoadMatrixd
61 #define vtkOpenGLCall_glLoadIdentity glLoadIdentity
62 #define vtkOpenGLCall_glSelectBuffer glSelectBuffer
63 #define vtkOpenGLCall_glRenderMode glRenderMode
64 #define vtkOpenGLCall_glInitNames glInitNames
65 #define vtkOpenGLCall_glPushName glPushName
66 #define vtkOpenGLCall_glLoadName glLoadName
67 #define vtkOpenGLCall_glGetIntegerv glGetIntegerv
68 #define vtkOpenGLCall_glIsTexture glIsTexture
69 #define vtkOpenGLCall_glDeleteTextures glDeleteTexture
70 #define vtkOpenGLCall_glGenTextures glGenTextures
71 #define vtkOpenGLCall_glBindTexture glBindTexture
72 #define vtkOpenGLCall_glTexParameterf glTextParameterf
73 #define vtkOpenGLCall_glTexCoord2fv glTexCoord2fv
74 #define vtkOpenGLCall_glVertex3fv glVertex3fv
75 #define vtkOpenGLCall_glNormal3fv glNormal3fv
76 #define vtkOpenGLCall_glColor3f glColor3f
77 #define vtkOpenGLCall_glColor4ubv glColor4ubv
78 #define vtkOpenGLCall_glColor4fv glColor4fv
79 #define vtkOpenGLCall_glBegin glBegin
80 #define vtkOpenGLCall_glEnd glEnd
81 #define vtkOpenGLCall_glTexImage2D glTextImage2D
82 #define vtkOpenGLCall_glDeleteLists glDeleteLists
83 #define vtkOpenGLCall_glIsList glIsList
84 #define vtkOpenGLCall_glGenLists glGenLists
85 #define vtkOpenGLCall_glCallList glCallList
86 #define vtkOpenGLCall_glReadBuffer glReadBuffer
87 #define vtkOpenGLCall_glPixelStorei glPixelStorei
88 #define vtkOpenGLCall_glReadPixels glReadPixels
89 #define vtkOpenGLCall_glRasterPos3f glRasterPos3f
90 #define vtkOpenGLCall_glDrawPixels glDrawPixels
91 #define vtkOpenGLCall_glRasterPos2f glRasterPos2f
92 #define vtkOpenGLCall_glNewList glNewList
93 #define vtkOpenGLCall_glEndList glEndList
131 register char *val=0;
146 if(e>=0xB10 && e<=0xDE1)
153 printf(
"Error: glEnable of 0x%X failed\n",e);
166 register char *val=0;
181 if(e>=0xB10 && e<=0xDE1)
188 printf(
"Error: glEnable of 0x%X failed\n",e);
238 if(e==GL_TEXTURE_ENV && e1==GL_TEXTURE_ENV_MODE)
264 if(e==GL_LIGHT_MODEL_AMBIENT &&
282 inline void glLightfv( GLenum light, GLenum pname,
const GLfloat *params)
284 register GLfloat *val =
Lightfv_buckets + ((((int)(pname-0x1201))|((
int)(light-GL_LIGHT0)<<3))<<2);
285 if(params[0]!=val[0] ||
307 inline void glLightf( GLenum light, GLenum pname, GLfloat f){
308 register GLfloat *val=
Lightf_buckets+(((int)(light-GL_LIGHT0)<<3)|((
int)(pname-0x1205)));
313 if(pname==GL_SPOT_CUTOFF)
322 inline void glLighti( GLenum light, GLenum pname, GLint f)
344 inline void glMaterialfv(GLenum face, GLenum pname,
const GLfloat *params )
347 register GLfloat *val;
350 idx=pname-0x1600 + 4;
362 if(val[0]!=params[0] ||
483 inline void glScissor(GLint llx,GLint lly,GLint u,GLint v){
566 #ifdef GL_VERSION_1_1
568 GLfloat PolygonOffset_bucket[2];
569 inline void glPolygonOffset( GLfloat f,GLfloat u) {
570 if(PolygonOffset_bucket[0]!=f ||
571 PolygonOffset_bucket[1]!=u){
572 PolygonOffset_bucket[0]=f;
573 PolygonOffset_bucket[1]=u;
574 ::glPolygonOffset(f,u);