diff --git a/XGL/Makefile b/XGL/Makefile new file mode 100644 index 000000000..bcf606dcb --- /dev/null +++ b/XGL/Makefile @@ -0,0 +1,71 @@ +#--------------------------------------------------------------------------- +# Makefile +# +# Written by Curtis Olson, started December 1997. +# +# Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# $Id$ +# (Log is kept at end of this file) +#--------------------------------------------------------------------------- + + +TARGET = libXGL.a + +CFILES = xgl.c xglUtils.c +OFILES = $(CFILES:.c=.o) + + +include ../make.inc + + +CFLAGS = $(FG_CFLAGS) + + + +#--------------------------------------------------------------------------- +# Primary Targets +#--------------------------------------------------------------------------- + +$(TARGET): $(OFILES) + $(AR) rv $(TARGET) $(OFILES) + $(RANLIB) $(TARGET) + +all: $(TARGET) + +clean: + rm -f *.o $(TARGET) lib*.a *.os2 *~ core + + +#--------------------------------------------------------------------------- +# Secondary Targets +#--------------------------------------------------------------------------- + +include depend + +xgl.o: + $(CC) $(CFLAGS) -c xgl.c -o $@ + +xglUtils.o: + $(CC) $(CFLAGS) -c xglUtils.c -o $@ + + +#--------------------------------------------------------------------------- +# $Log$ +# Revision 1.1 1997/12/16 00:49:09 curt +# Initial revision. +# diff --git a/XGL/depend b/XGL/depend new file mode 100644 index 000000000..f3ae635ce --- /dev/null +++ b/XGL/depend @@ -0,0 +1,2 @@ +xgl.o: xgl.c xgl.h +xglUtils.o: xglUtils.c xgl.h diff --git a/XGL/xgl.c b/XGL/xgl.c new file mode 100644 index 000000000..103bd57ce --- /dev/null +++ b/XGL/xgl.c @@ -0,0 +1,3022 @@ +#include +#include + +#ifdef WIN32 +# include +#else +# include +#endif + +#include "xgl.h" +#include + +#ifdef XGL_TRACE + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +GLboolean xglIsEnabled ( GLenum cap ) +{ + if ( xglTraceIsEnabled("glIsEnabled") ) + fprintf ( xglTraceFd, " /* glIsEnabled ( (GLenum)%s ) ; */\n" , xglExpandGLenum ( (GLenum) cap ) ) ; + + return glIsEnabled ( cap ) ; +} + +GLboolean xglIsList ( GLuint list ) +{ + if ( xglTraceIsEnabled("glIsList") ) + fprintf ( xglTraceFd, " /* glIsList ( (GLuint)%u ) ; */\n" , list ) ; + + return glIsList ( list ) ; +} + +GLenum xglGetError ( ) +{ + if ( xglTraceIsEnabled("glGetError") ) + fprintf ( xglTraceFd, " /* glGetError ( ) ; */\n" ) ; + + return glGetError ( ) ; +} + +GLint xglRenderMode ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glRenderMode") ) + fprintf ( xglTraceFd, " glRenderMode ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + + return glRenderMode ( mode ) ; +} + +GLuint xglGenLists ( GLsizei range ) +{ + if ( xglTraceIsEnabled("glGenLists") ) + fprintf ( xglTraceFd, " glGenLists ( (GLsizei)%d ) ;\n" , range ) ; + + return glGenLists ( range ) ; +} + +const GLubyte* xglGetString ( GLenum name ) +{ + if ( xglTraceIsEnabled("glGetString") ) + fprintf ( xglTraceFd, " /* glGetString ( (GLenum)%s ) ; */\n" , xglExpandGLenum ( (GLenum) name ) ) ; + + return glGetString ( name ) ; +} + +void xglAccum ( GLenum op, GLfloat value ) +{ + if ( xglTraceIsEnabled("glAccum") ) + fprintf ( xglTraceFd, " glAccum ( (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) op ), value ) ; + if ( xglExecuteIsEnabled("glAccum") ) + glAccum ( op, value ) ; +} + +void xglAlphaFunc ( GLenum func, GLclampf ref ) +{ + if ( xglTraceIsEnabled("glAlphaFunc") ) + fprintf ( xglTraceFd, " glAlphaFunc ( (GLenum)%s, (GLclampf)%ff ) ;\n" , xglExpandGLenum ( (GLenum) func ), ref ) ; + if ( xglExecuteIsEnabled("glAlphaFunc") ) + glAlphaFunc ( func, ref ) ; +} + +void xglArrayElementEXT ( GLint i ) +{ + if ( xglTraceIsEnabled("glArrayElementEXT") ) + fprintf ( xglTraceFd, " glArrayElementEXT ( (GLint)%d ) ;\n" , i ) ; +#ifdef GL_VERSION_1_1 + glArrayElement ( i ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glArrayElementEXT") ) + glArrayElementEXT ( i ) ; +#else + fprintf ( xglTraceFd, " glArrayElementEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglBegin ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glBegin") ) + fprintf ( xglTraceFd, " glBegin ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glBegin") ) + glBegin ( mode ) ; +} + +void xglBitmap ( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte* bitmap ) +{ + if ( xglTraceIsEnabled("glBitmap") ) + fprintf ( xglTraceFd, " glBitmap ( (GLsizei)%d, (GLsizei)%d, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLubyte *)0x%08x ) ;\n" , width, height, xorig, yorig, xmove, ymove, bitmap ) ; + if ( xglExecuteIsEnabled("glBitmap") ) + glBitmap ( width, height, xorig, yorig, xmove, ymove, bitmap ) ; +} + +void xglBlendColorEXT ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) +{ + if ( xglTraceIsEnabled("glBlendColorEXT") ) + fprintf ( xglTraceFd, " glBlendColorEXT ( (GLclampf)%ff, (GLclampf)%ff, (GLclampf)%ff, (GLclampf)%ff ) ;\n" , red, green, blue, alpha ) ; +#ifdef GL_EXT_blend_color + if ( xglExecuteIsEnabled("glBlendColorEXT") ) + glBlendColorEXT ( red, green, blue, alpha ) ; +#else + fprintf ( xglTraceFd, " glBlendColorEXT isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglBlendEquationEXT ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glBlendEquationEXT") ) + fprintf ( xglTraceFd, " glBlendEquationEXT ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; +#ifdef GL_EXT_blend_minmax + if ( xglExecuteIsEnabled("glBlendEquationEXT") ) + glBlendEquationEXT ( mode ) ; +#else + fprintf ( xglTraceFd, " glBlendEquationEXT isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglBlendFunc ( GLenum sfactor, GLenum dfactor ) +{ + if ( xglTraceIsEnabled("glBlendFunc") ) + fprintf ( xglTraceFd, " glBlendFunc ( (GLenum)%s, (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) sfactor ), xglExpandGLenum ( (GLenum) dfactor ) ) ; + if ( xglExecuteIsEnabled("glBlendFunc") ) + glBlendFunc ( sfactor, dfactor ) ; +} + +void xglCallList ( GLuint list ) +{ + if ( xglTraceIsEnabled("glCallList") ) + fprintf ( xglTraceFd, " glCallList ( (GLuint)%u ) ;\n" , list ) ; + if ( xglExecuteIsEnabled("glCallList") ) + glCallList ( list ) ; +} + +void xglCallLists ( GLsizei n, GLenum type, GLvoid* lists ) +{ + if ( xglTraceIsEnabled("glCallLists") ) + fprintf ( xglTraceFd, " glCallLists ( (GLsizei)%d, (GLenum)%s, (GLvoid *)0x%08x ) ;\n" , n, xglExpandGLenum ( (GLenum) type ), lists ) ; + if ( xglExecuteIsEnabled("glCallLists") ) + glCallLists ( n, type, lists ) ; +} + + +void xglClear ( GLbitfield mask ) +{ + if ( xglTraceIsEnabled("glClear") ) + switch ( mask ) + { + case GL_COLOR_BUFFER_BIT : + fprintf ( xglTraceFd, " glClear ( GL_COLOR_BUFFER_BIT ) ;\n" ) ; + break ; + case GL_DEPTH_BUFFER_BIT : + fprintf ( xglTraceFd, " glClear ( GL_DEPTH_BUFFER_BIT ) ;\n" ) ; + break ; + case GL_ACCUM_BUFFER_BIT : + fprintf ( xglTraceFd, " glClear ( GL_ACCUM_BUFFER_BIT ) ;\n" ) ; + break ; + case GL_STENCIL_BUFFER_BIT : + fprintf ( xglTraceFd, " glClear ( GL_STENCIL_BUFFER_BIT ) ;\n" ) ; + break ; + case (GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) : + fprintf ( xglTraceFd, " glClear ( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT ) ;\n" ) ; + break ; + + default : + fprintf ( xglTraceFd, " glClear ( (GLbitfield)0x%08x ) ;\n" , mask ) ; break ; + } + + if ( xglExecuteIsEnabled("glClear") ) + glClear ( mask ) ; +} + + +void xglClearAccum ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) +{ + if ( xglTraceIsEnabled("glClearAccum") ) + fprintf ( xglTraceFd, " glClearAccum ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glClearAccum") ) + glClearAccum ( red, green, blue, alpha ) ; +} + +void xglClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) +{ + if ( xglTraceIsEnabled("glClearColor") ) + fprintf ( xglTraceFd, " glClearColor ( (GLclampf)%ff, (GLclampf)%ff, (GLclampf)%ff, (GLclampf)%ff ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glClearColor") ) + glClearColor ( red, green, blue, alpha ) ; +} + +void xglClearDepth ( GLclampd depth ) +{ + if ( xglTraceIsEnabled("glClearDepth") ) + fprintf ( xglTraceFd, " glClearDepth ( (GLclampd)%f ) ;\n" , depth ) ; + if ( xglExecuteIsEnabled("glClearDepth") ) + glClearDepth ( depth ) ; +} + +void xglClearIndex ( GLfloat c ) +{ + if ( xglTraceIsEnabled("glClearIndex") ) + fprintf ( xglTraceFd, " glClearIndex ( (GLfloat)%ff ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glClearIndex") ) + glClearIndex ( c ) ; +} + +void xglClearStencil ( GLint s ) +{ + if ( xglTraceIsEnabled("glClearStencil") ) + fprintf ( xglTraceFd, " glClearStencil ( (GLint)%d ) ;\n" , s ) ; + if ( xglExecuteIsEnabled("glClearStencil") ) + glClearStencil ( s ) ; +} + +void xglClipPlane ( GLenum plane, GLdouble* equation ) +{ + if ( xglTraceIsEnabled("glClipPlane") ) + fprintf ( xglTraceFd, " glClipPlane ( (GLenum)%s, (GLdouble *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) plane ), equation ) ; + if ( xglExecuteIsEnabled("glClipPlane") ) + glClipPlane ( plane, equation ) ; +} + +void xglColor3b ( GLbyte red, GLbyte green, GLbyte blue ) +{ + if ( xglTraceIsEnabled("glColor3b") ) + fprintf ( xglTraceFd, " glColor3b ( (GLbyte)%d, (GLbyte)%d, (GLbyte)%d ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3b") ) + glColor3b ( red, green, blue ) ; +} + +void xglColor3bv ( GLbyte* v ) +{ + if ( xglTraceIsEnabled("glColor3bv") ) + fprintf ( xglTraceFd, " glColor3bv ( xglBuild3bv((GLbyte)%d,(GLbyte)%d,(GLbyte)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3bv") ) + glColor3bv ( v ) ; +} + +void xglColor3d ( GLdouble red, GLdouble green, GLdouble blue ) +{ + if ( xglTraceIsEnabled("glColor3d") ) + fprintf ( xglTraceFd, " glColor3d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3d") ) + glColor3d ( red, green, blue ) ; +} + +void xglColor3dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glColor3dv") ) + fprintf ( xglTraceFd, " glColor3dv ( xglBuild3dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3dv") ) + glColor3dv ( v ) ; +} + +void xglColor3f ( GLfloat red, GLfloat green, GLfloat blue ) +{ + if ( xglTraceIsEnabled("glColor3f") ) + fprintf ( xglTraceFd, " glColor3f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3f") ) + glColor3f ( red, green, blue ) ; +} + +void xglColor3fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glColor3fv") ) + fprintf ( xglTraceFd, " glColor3fv ( xglBuild3fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3fv") ) + glColor3fv ( v ) ; +} + +void xglColor3i ( GLint red, GLint green, GLint blue ) +{ + if ( xglTraceIsEnabled("glColor3i") ) + fprintf ( xglTraceFd, " glColor3i ( (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3i") ) + glColor3i ( red, green, blue ) ; +} + +void xglColor3iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glColor3iv") ) + fprintf ( xglTraceFd, " glColor3iv ( xglBuild3iv((GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3iv") ) + glColor3iv ( v ) ; +} + +void xglColor3s ( GLshort red, GLshort green, GLshort blue ) +{ + if ( xglTraceIsEnabled("glColor3s") ) + fprintf ( xglTraceFd, " glColor3s ( (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3s") ) + glColor3s ( red, green, blue ) ; +} + +void xglColor3sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glColor3sv") ) + fprintf ( xglTraceFd, " glColor3sv ( xglBuild3sv((GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3sv") ) + glColor3sv ( v ) ; +} + +void xglColor3ub ( GLubyte red, GLubyte green, GLubyte blue ) +{ + if ( xglTraceIsEnabled("glColor3ub") ) + fprintf ( xglTraceFd, " glColor3ub ( (GLubyte)%u, (GLubyte)%u, (GLubyte)%u ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3ub") ) + glColor3ub ( red, green, blue ) ; +} + +void xglColor3ubv ( GLubyte* v ) +{ + if ( xglTraceIsEnabled("glColor3ubv") ) + fprintf ( xglTraceFd, " glColor3ubv ( xglBuild3ubv((GLubyte)%d,(GLubyte)%d,(GLubyte)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3ubv") ) + glColor3ubv ( v ) ; +} + +void xglColor3ui ( GLuint red, GLuint green, GLuint blue ) +{ + if ( xglTraceIsEnabled("glColor3ui") ) + fprintf ( xglTraceFd, " glColor3ui ( (GLuint)%u, (GLuint)%u, (GLuint)%u ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3ui") ) + glColor3ui ( red, green, blue ) ; +} + +void xglColor3uiv ( GLuint* v ) +{ + if ( xglTraceIsEnabled("glColor3uiv") ) + fprintf ( xglTraceFd, " glColor3uiv ( xglBuild3uiv((GLuint)%d,(GLuint)%d,(GLuint)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3uiv") ) + glColor3uiv ( v ) ; +} + +void xglColor3us ( GLushort red, GLushort green, GLushort blue ) +{ + if ( xglTraceIsEnabled("glColor3us") ) + fprintf ( xglTraceFd, " glColor3us ( (GLushort)%u, (GLushort)%u, (GLushort)%u ) ;\n" , red, green, blue ) ; + if ( xglExecuteIsEnabled("glColor3us") ) + glColor3us ( red, green, blue ) ; +} + +void xglColor3usv ( GLushort* v ) +{ + if ( xglTraceIsEnabled("glColor3usv") ) + fprintf ( xglTraceFd, " glColor3usv ( xglBuild3usv((GLushort)%d,(GLushort)%d,(GLushort)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glColor3usv") ) + glColor3usv ( v ) ; +} + +void xglColor4b ( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ) +{ + if ( xglTraceIsEnabled("glColor4b") ) + fprintf ( xglTraceFd, " glColor4b ( (GLbyte)%d, (GLbyte)%d, (GLbyte)%d, (GLbyte)%d ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4b") ) + glColor4b ( red, green, blue, alpha ) ; +} + +void xglColor4bv ( GLbyte* v ) +{ + if ( xglTraceIsEnabled("glColor4bv") ) + fprintf ( xglTraceFd, " glColor4bv ( xglBuild4bv((GLbyte)%d,(GLbyte)%d,(GLbyte)%d,(GLbyte)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4bv") ) + glColor4bv ( v ) ; +} + +void xglColor4d ( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) +{ + if ( xglTraceIsEnabled("glColor4d") ) + fprintf ( xglTraceFd, " glColor4d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4d") ) + glColor4d ( red, green, blue, alpha ) ; +} + +void xglColor4dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glColor4dv") ) + fprintf ( xglTraceFd, " glColor4dv ( xglBuild4dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4dv") ) + glColor4dv ( v ) ; +} + +void xglColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) +{ + if ( xglTraceIsEnabled("glColor4f") ) + fprintf ( xglTraceFd, " glColor4f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4f") ) + glColor4f ( red, green, blue, alpha ) ; +} + +void xglColor4fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glColor4fv") ) + fprintf ( xglTraceFd, " glColor4fv ( xglBuild4fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4fv") ) + glColor4fv ( v ) ; +} + +void xglColor4i ( GLint red, GLint green, GLint blue, GLint alpha ) +{ + if ( xglTraceIsEnabled("glColor4i") ) + fprintf ( xglTraceFd, " glColor4i ( (GLint)%d, (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4i") ) + glColor4i ( red, green, blue, alpha ) ; +} + +void xglColor4iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glColor4iv") ) + fprintf ( xglTraceFd, " glColor4iv ( xglBuild4iv((GLint)%d,(GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4iv") ) + glColor4iv ( v ) ; +} + +void xglColor4s ( GLshort red, GLshort green, GLshort blue, GLshort alpha ) +{ + if ( xglTraceIsEnabled("glColor4s") ) + fprintf ( xglTraceFd, " glColor4s ( (GLshort)%d, (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4s") ) + glColor4s ( red, green, blue, alpha ) ; +} + +void xglColor4sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glColor4sv") ) + fprintf ( xglTraceFd, " glColor4sv ( xglBuild4sv((GLshort)%d,(GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4sv") ) + glColor4sv ( v ) ; +} + +void xglColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) +{ + if ( xglTraceIsEnabled("glColor4ub") ) + fprintf ( xglTraceFd, " glColor4ub ( (GLubyte)%u, (GLubyte)%u, (GLubyte)%u, (GLubyte)%u ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4ub") ) + glColor4ub ( red, green, blue, alpha ) ; +} + +void xglColor4ubv ( GLubyte* v ) +{ + if ( xglTraceIsEnabled("glColor4ubv") ) + fprintf ( xglTraceFd, " glColor4ubv ( xglBuild4ubv((GLubyte)%d,(GLubyte)%d,(GLubyte)%d,(GLubyte)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4ubv") ) + glColor4ubv ( v ) ; +} + +void xglColor4ui ( GLuint red, GLuint green, GLuint blue, GLuint alpha ) +{ + if ( xglTraceIsEnabled("glColor4ui") ) + fprintf ( xglTraceFd, " glColor4ui ( (GLuint)%u, (GLuint)%u, (GLuint)%u, (GLuint)%u ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4ui") ) + glColor4ui ( red, green, blue, alpha ) ; +} + +void xglColor4uiv ( GLuint* v ) +{ + if ( xglTraceIsEnabled("glColor4uiv") ) + fprintf ( xglTraceFd, " glColor4uiv ( xglBuild4uiv((GLuint)%d,(GLuint)%d,(GLuint)%d,(GLuint)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4uiv") ) + glColor4uiv ( v ) ; +} + +void xglColor4us ( GLushort red, GLushort green, GLushort blue, GLushort alpha ) +{ + if ( xglTraceIsEnabled("glColor4us") ) + fprintf ( xglTraceFd, " glColor4us ( (GLushort)%u, (GLushort)%u, (GLushort)%u, (GLushort)%u ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColor4us") ) + glColor4us ( red, green, blue, alpha ) ; +} + +void xglColor4usv ( GLushort* v ) +{ + if ( xglTraceIsEnabled("glColor4usv") ) + fprintf ( xglTraceFd, " glColor4usv ( xglBuild4usv((GLushort)%d,(GLushort)%d,(GLushort)%d,(GLushort)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glColor4usv") ) + glColor4usv ( v ) ; +} + +void xglColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) +{ + if ( xglTraceIsEnabled("glColorMask") ) + fprintf ( xglTraceFd, " glColorMask ( (GLboolean)%d, (GLboolean)%d, (GLboolean)%d, (GLboolean)%d ) ;\n" , red, green, blue, alpha ) ; + if ( xglExecuteIsEnabled("glColorMask") ) + glColorMask ( red, green, blue, alpha ) ; +} + +void xglColorMaterial ( GLenum face, GLenum mode ) +{ + if ( xglTraceIsEnabled("glColorMaterial") ) + fprintf ( xglTraceFd, " glColorMaterial ( (GLenum)%s, (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glColorMaterial") ) + glColorMaterial ( face, mode ) ; +} + +void xglColorPointerEXT ( GLint size, GLenum type, GLsizei stride, GLsizei count, void* ptr ) +{ + if ( xglTraceIsEnabled("glColorPointerEXT") ) + fprintf ( xglTraceFd, " glColorPointerEXT ( (GLint)%d, (GLenum)%s, (GLsizei)%d, (GLsizei)%d, (void *)0x%08x ) ;\n" , size, xglExpandGLenum ( (GLenum) type ), stride, count, ptr ) ; +#ifdef GL_VERSION_1_1 + glColorPointer ( size, type, stride, ptr ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glColorPointerEXT") ) + glColorPointerEXT ( size, type, stride, count, ptr ) ; +#else + fprintf ( xglTraceFd, " glColorPointerEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglCopyPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ) +{ + if ( xglTraceIsEnabled("glCopyPixels") ) + fprintf ( xglTraceFd, " glCopyPixels ( (GLint)%d, (GLint)%d, (GLsizei)%d, (GLsizei)%d, (GLenum)%s ) ;\n" , x, y, width, height, xglExpandGLenum ( (GLenum) type ) ) ; + if ( xglExecuteIsEnabled("glCopyPixels") ) + glCopyPixels ( x, y, width, height, type ) ; +} + +void xglCullFace ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glCullFace") ) + fprintf ( xglTraceFd, " glCullFace ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glCullFace") ) + glCullFace ( mode ) ; +} + +void xglDeleteLists ( GLuint list, GLsizei range ) +{ + if ( xglTraceIsEnabled("glDeleteLists") ) + fprintf ( xglTraceFd, " glDeleteLists ( (GLuint)%u, (GLsizei)%d ) ;\n" , list, range ) ; + if ( xglExecuteIsEnabled("glDeleteLists") ) + glDeleteLists ( list, range ) ; +} + +void xglDepthFunc ( GLenum func ) +{ + if ( xglTraceIsEnabled("glDepthFunc") ) + fprintf ( xglTraceFd, " glDepthFunc ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) func ) ) ; + if ( xglExecuteIsEnabled("glDepthFunc") ) + glDepthFunc ( func ) ; +} + +void xglDepthMask ( GLboolean flag ) +{ + if ( xglTraceIsEnabled("glDepthMask") ) + fprintf ( xglTraceFd, " glDepthMask ( (GLboolean)%d ) ;\n" , flag ) ; + if ( xglExecuteIsEnabled("glDepthMask") ) + glDepthMask ( flag ) ; +} + +void xglDepthRange ( GLclampd near_val, GLclampd far_val ) +{ + if ( xglTraceIsEnabled("glDepthRange") ) + fprintf ( xglTraceFd, " glDepthRange ( (GLclampd)%f, (GLclampd)%f ) ;\n" , near_val, far_val ) ; + if ( xglExecuteIsEnabled("glDepthRange") ) + glDepthRange ( near_val, far_val ) ; +} + +void xglDisable ( GLenum cap ) +{ + if ( xglTraceIsEnabled("glDisable") ) + fprintf ( xglTraceFd, " glDisable ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) cap ) ) ; + if ( xglExecuteIsEnabled("glDisable") ) + glDisable ( cap ) ; +} + +void xglDrawArraysEXT ( GLenum mode, GLint first, GLsizei count ) +{ + if ( xglTraceIsEnabled("glDrawArraysEXT") ) + fprintf ( xglTraceFd, " glDrawArraysEXT ( (GLenum)%s, (GLint)%d, (GLsizei)%d ) ;\n" , xglExpandGLenum ( (GLenum) mode ), first, count ) ; +#ifdef GL_VERSION_1_1 + glDrawArrays ( mode, first, count ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glDrawArraysEXT") ) + glDrawArraysEXT ( mode, first, count ) ; +#else + fprintf ( xglTraceFd, " glDrawArraysEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglDrawBuffer ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glDrawBuffer") ) + fprintf ( xglTraceFd, " glDrawBuffer ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glDrawBuffer") ) + glDrawBuffer ( mode ) ; +} + +void xglDrawPixels ( GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels ) +{ + if ( xglTraceIsEnabled("glDrawPixels") ) + fprintf ( xglTraceFd, " glDrawPixels ( (GLsizei)%d, (GLsizei)%d, (GLenum)%s, (GLenum)%s, (GLvoid *)0x%08x ) ;\n" , width, height, xglExpandGLenum ( (GLenum) format ), xglExpandGLenum ( (GLenum) type ), pixels ) ; + if ( xglExecuteIsEnabled("glDrawPixels") ) + glDrawPixels ( width, height, format, type, pixels ) ; +} + +void xglEdgeFlag ( GLboolean flag ) +{ + if ( xglTraceIsEnabled("glEdgeFlag") ) + fprintf ( xglTraceFd, " glEdgeFlag ( (GLboolean)%d ) ;\n" , flag ) ; + if ( xglExecuteIsEnabled("glEdgeFlag") ) + glEdgeFlag ( flag ) ; +} + +void xglEdgeFlagPointerEXT ( GLsizei stride, GLsizei count, GLboolean* ptr ) +{ + if ( xglTraceIsEnabled("glEdgeFlagPointerEXT") ) + fprintf ( xglTraceFd, " glEdgeFlagPointerEXT ( (GLsizei)%d, (GLsizei)%d, (GLboolean *)0x%08x ) ;\n" , stride, count, ptr ) ; +#ifdef GL_VERSION_1_1 + glEdgeFlagPointer ( stride, ptr ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glEdgeFlagPointerEXT") ) + glEdgeFlagPointerEXT ( stride, count, ptr ) ; +#else + fprintf ( xglTraceFd, " glEdgeFlagPointerEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglEdgeFlagv ( GLboolean* flag ) +{ + if ( xglTraceIsEnabled("glEdgeFlagv") ) + fprintf ( xglTraceFd, " glEdgeFlagv ( (GLboolean *)0x%08x ) ;\n" , flag ) ; + if ( xglExecuteIsEnabled("glEdgeFlagv") ) + glEdgeFlagv ( flag ) ; +} + +void xglEnable ( GLenum cap ) +{ + if ( xglTraceIsEnabled("glEnable") ) + fprintf ( xglTraceFd, " glEnable ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) cap ) ) ; + if ( xglExecuteIsEnabled("glEnable") ) + glEnable ( cap ) ; +} + +void xglEnd ( ) +{ + if ( xglTraceIsEnabled("glEnd") ) + fprintf ( xglTraceFd, " glEnd ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glEnd") ) + glEnd ( ) ; +} + +void xglEndList ( ) +{ + if ( xglTraceIsEnabled("glEndList") ) + fprintf ( xglTraceFd, " glEndList ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glEndList") ) + glEndList ( ) ; +} + +void xglEvalCoord1d ( GLdouble u ) +{ + if ( xglTraceIsEnabled("glEvalCoord1d") ) + fprintf ( xglTraceFd, " glEvalCoord1d ( (GLdouble)%f ) ;\n" , u ) ; + if ( xglExecuteIsEnabled("glEvalCoord1d") ) + glEvalCoord1d ( u ) ; +} + +void xglEvalCoord1dv ( GLdouble* u ) +{ + if ( xglTraceIsEnabled("glEvalCoord1dv") ) + fprintf ( xglTraceFd, " glEvalCoord1dv ( xglBuild1dv((GLdouble)%f) ) ;\n" , u[0] ) ; + if ( xglExecuteIsEnabled("glEvalCoord1dv") ) + glEvalCoord1dv ( u ) ; +} + +void xglEvalCoord1f ( GLfloat u ) +{ + if ( xglTraceIsEnabled("glEvalCoord1f") ) + fprintf ( xglTraceFd, " glEvalCoord1f ( (GLfloat)%ff ) ;\n" , u ) ; + if ( xglExecuteIsEnabled("glEvalCoord1f") ) + glEvalCoord1f ( u ) ; +} + +void xglEvalCoord1fv ( GLfloat* u ) +{ + if ( xglTraceIsEnabled("glEvalCoord1fv") ) + fprintf ( xglTraceFd, " glEvalCoord1fv ( xglBuild1fv((GLfloat)%ff) ) ;\n" , u[0] ) ; + if ( xglExecuteIsEnabled("glEvalCoord1fv") ) + glEvalCoord1fv ( u ) ; +} + +void xglEvalCoord2d ( GLdouble u, GLdouble v ) +{ + if ( xglTraceIsEnabled("glEvalCoord2d") ) + fprintf ( xglTraceFd, " glEvalCoord2d ( (GLdouble)%f, (GLdouble)%f ) ;\n" , u, v ) ; + if ( xglExecuteIsEnabled("glEvalCoord2d") ) + glEvalCoord2d ( u, v ) ; +} + +void xglEvalCoord2dv ( GLdouble* u ) +{ + if ( xglTraceIsEnabled("glEvalCoord2dv") ) + fprintf ( xglTraceFd, " glEvalCoord2dv ( xglBuild2dv((GLdouble)%f,(GLdouble)%f) ) ;\n" , u[0], u[1] ) ; + if ( xglExecuteIsEnabled("glEvalCoord2dv") ) + glEvalCoord2dv ( u ) ; +} + +void xglEvalCoord2f ( GLfloat u, GLfloat v ) +{ + if ( xglTraceIsEnabled("glEvalCoord2f") ) + fprintf ( xglTraceFd, " glEvalCoord2f ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , u, v ) ; + if ( xglExecuteIsEnabled("glEvalCoord2f") ) + glEvalCoord2f ( u, v ) ; +} + +void xglEvalCoord2fv ( GLfloat* u ) +{ + if ( xglTraceIsEnabled("glEvalCoord2fv") ) + fprintf ( xglTraceFd, " glEvalCoord2fv ( xglBuild2fv((GLfloat)%ff,(GLfloat)%ff) ) ;\n" , u[0], u[1] ) ; + if ( xglExecuteIsEnabled("glEvalCoord2fv") ) + glEvalCoord2fv ( u ) ; +} + +void xglEvalMesh1 ( GLenum mode, GLint i1, GLint i2 ) +{ + if ( xglTraceIsEnabled("glEvalMesh1") ) + fprintf ( xglTraceFd, " glEvalMesh1 ( (GLenum)%s, (GLint)%d, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) mode ), i1, i2 ) ; + if ( xglExecuteIsEnabled("glEvalMesh1") ) + glEvalMesh1 ( mode, i1, i2 ) ; +} + +void xglEvalMesh2 ( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) +{ + if ( xglTraceIsEnabled("glEvalMesh2") ) + fprintf ( xglTraceFd, " glEvalMesh2 ( (GLenum)%s, (GLint)%d, (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) mode ), i1, i2, j1, j2 ) ; + if ( xglExecuteIsEnabled("glEvalMesh2") ) + glEvalMesh2 ( mode, i1, i2, j1, j2 ) ; +} + +void xglEvalPoint1 ( GLint i ) +{ + if ( xglTraceIsEnabled("glEvalPoint1") ) + fprintf ( xglTraceFd, " glEvalPoint1 ( (GLint)%d ) ;\n" , i ) ; + if ( xglExecuteIsEnabled("glEvalPoint1") ) + glEvalPoint1 ( i ) ; +} + +void xglEvalPoint2 ( GLint i, GLint j ) +{ + if ( xglTraceIsEnabled("glEvalPoint2") ) + fprintf ( xglTraceFd, " glEvalPoint2 ( (GLint)%d, (GLint)%d ) ;\n" , i, j ) ; + if ( xglExecuteIsEnabled("glEvalPoint2") ) + glEvalPoint2 ( i, j ) ; +} + +void xglFeedbackBuffer ( GLsizei size, GLenum type, GLfloat* buffer ) +{ + if ( xglTraceIsEnabled("glFeedbackBuffer") ) + fprintf ( xglTraceFd, " glFeedbackBuffer ( (GLsizei)%d, (GLenum)%s, (GLfloat *)0x%08x ) ;\n" , size, xglExpandGLenum ( (GLenum) type ), buffer ) ; + if ( xglExecuteIsEnabled("glFeedbackBuffer") ) + glFeedbackBuffer ( size, type, buffer ) ; +} + +void xglFinish ( ) +{ + if ( xglTraceIsEnabled("glFinish") ) + fprintf ( xglTraceFd, " glFinish ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glFinish") ) + glFinish ( ) ; +} + +void xglFlush ( ) +{ + if ( xglTraceIsEnabled("glFlush") ) + fprintf ( xglTraceFd, " glFlush ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glFlush") ) + glFlush ( ) ; +} + +void xglFogf ( GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glFogf") ) + fprintf ( xglTraceFd, " glFogf ( (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glFogf") ) + glFogf ( pname, param ) ; +} + +void xglFogfv ( GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glFogfv") ) + fprintf ( xglTraceFd, " glFogfv ( (GLenum)%s, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glFogfv") ) + glFogfv ( pname, params ) ; +} + +void xglFogi ( GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glFogi") ) + fprintf ( xglTraceFd, " glFogi ( (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glFogi") ) + glFogi ( pname, param ) ; +} + +void xglFogiv ( GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glFogiv") ) + fprintf ( xglTraceFd, " glFogiv ( (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glFogiv") ) + glFogiv ( pname, params ) ; +} + +void xglFrontFace ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glFrontFace") ) + fprintf ( xglTraceFd, " glFrontFace ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glFrontFace") ) + glFrontFace ( mode ) ; +} + +void xglFrustum ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) +{ + if ( xglTraceIsEnabled("glFrustum") ) + fprintf ( xglTraceFd, " glFrustum ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , left, right, bottom, top, near_val, far_val ) ; + if ( xglExecuteIsEnabled("glFrustum") ) + glFrustum ( left, right, bottom, top, near_val, far_val ) ; +} + +void xglGetBooleanv ( GLenum pname, GLboolean* params ) +{ + if ( xglTraceIsEnabled("glGetBooleanv") ) + fprintf ( xglTraceFd, " /* glGetBooleanv ( (GLenum)%s, (GLboolean *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetBooleanv") ) + glGetBooleanv ( pname, params ) ; +} + +void xglGetClipPlane ( GLenum plane, GLdouble* equation ) +{ + if ( xglTraceIsEnabled("glGetClipPlane") ) + fprintf ( xglTraceFd, " /* glGetClipPlane ( (GLenum)%s, (GLdouble *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) plane ), equation ) ; + if ( xglExecuteIsEnabled("glGetClipPlane") ) + glGetClipPlane ( plane, equation ) ; +} + +void xglGetDoublev ( GLenum pname, GLdouble* params ) +{ + if ( xglTraceIsEnabled("glGetDoublev") ) + fprintf ( xglTraceFd, " /* glGetDoublev ( (GLenum)%s, (GLdouble *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetDoublev") ) + glGetDoublev ( pname, params ) ; +} + +void xglGetFloatv ( GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetFloatv") ) + fprintf ( xglTraceFd, " /* glGetFloatv ( (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetFloatv") ) + glGetFloatv ( pname, params ) ; +} + +void xglGetIntegerv ( GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetIntegerv") ) + fprintf ( xglTraceFd, " /* glGetIntegerv ( (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetIntegerv") ) + glGetIntegerv ( pname, params ) ; +} + +void xglGetLightfv ( GLenum light, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetLightfv") ) + fprintf ( xglTraceFd, " /* glGetLightfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) light ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetLightfv") ) + glGetLightfv ( light, pname, params ) ; +} + +void xglGetLightiv ( GLenum light, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetLightiv") ) + fprintf ( xglTraceFd, " /* glGetLightiv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) light ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetLightiv") ) + glGetLightiv ( light, pname, params ) ; +} + +void xglGetMapdv ( GLenum target, GLenum query, GLdouble* v ) +{ + if ( xglTraceIsEnabled("glGetMapdv") ) + fprintf ( xglTraceFd, " /* glGetMapdv ( (GLenum)%s, (GLenum)%s, (GLdouble *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) query ), v ) ; + if ( xglExecuteIsEnabled("glGetMapdv") ) + glGetMapdv ( target, query, v ) ; +} + +void xglGetMapfv ( GLenum target, GLenum query, GLfloat* v ) +{ + if ( xglTraceIsEnabled("glGetMapfv") ) + fprintf ( xglTraceFd, " /* glGetMapfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) query ), v ) ; + if ( xglExecuteIsEnabled("glGetMapfv") ) + glGetMapfv ( target, query, v ) ; +} + +void xglGetMapiv ( GLenum target, GLenum query, GLint* v ) +{ + if ( xglTraceIsEnabled("glGetMapiv") ) + fprintf ( xglTraceFd, " /* glGetMapiv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) query ), v ) ; + if ( xglExecuteIsEnabled("glGetMapiv") ) + glGetMapiv ( target, query, v ) ; +} + +void xglGetMaterialfv ( GLenum face, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetMaterialfv") ) + fprintf ( xglTraceFd, " /* glGetMaterialfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetMaterialfv") ) + glGetMaterialfv ( face, pname, params ) ; +} + +void xglGetMaterialiv ( GLenum face, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetMaterialiv") ) + fprintf ( xglTraceFd, " /* glGetMaterialiv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetMaterialiv") ) + glGetMaterialiv ( face, pname, params ) ; +} + +void xglGetPixelMapfv ( GLenum map, GLfloat* values ) +{ + if ( xglTraceIsEnabled("glGetPixelMapfv") ) + fprintf ( xglTraceFd, " /* glGetPixelMapfv ( (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) map ), values ) ; + if ( xglExecuteIsEnabled("glGetPixelMapfv") ) + glGetPixelMapfv ( map, values ) ; +} + +void xglGetPixelMapuiv ( GLenum map, GLuint* values ) +{ + if ( xglTraceIsEnabled("glGetPixelMapuiv") ) + fprintf ( xglTraceFd, " /* glGetPixelMapuiv ( (GLenum)%s, (GLuint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) map ), values ) ; + if ( xglExecuteIsEnabled("glGetPixelMapuiv") ) + glGetPixelMapuiv ( map, values ) ; +} + +void xglGetPixelMapusv ( GLenum map, GLushort* values ) +{ + if ( xglTraceIsEnabled("glGetPixelMapusv") ) + fprintf ( xglTraceFd, " /* glGetPixelMapusv ( (GLenum)%s, (GLushort *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) map ), values ) ; + if ( xglExecuteIsEnabled("glGetPixelMapusv") ) + glGetPixelMapusv ( map, values ) ; +} + +void xglGetPointervEXT ( GLenum pname, void** params ) +{ + if ( xglTraceIsEnabled("glGetPointervEXT") ) + fprintf ( xglTraceFd, " /* glGetPointervEXT ( (GLenum)%s, (void **)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; +#ifdef GL_VERSION_1_1 + glGetPointerv ( pname, params ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glGetPointervEXT") ) + glGetPointervEXT ( pname, params ) ; +#else + fprintf ( xglTraceFd, " glGetPointervEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglGetPolygonStipple ( GLubyte* mask ) +{ + if ( xglTraceIsEnabled("glGetPolygonStipple") ) + fprintf ( xglTraceFd, " /* glGetPolygonStipple ( (GLubyte *)0x%08x ) ; */\n" , mask ) ; + if ( xglExecuteIsEnabled("glGetPolygonStipple") ) + glGetPolygonStipple ( mask ) ; +} + +void xglGetTexEnvfv ( GLenum target, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetTexEnvfv") ) + fprintf ( xglTraceFd, " /* glGetTexEnvfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexEnvfv") ) + glGetTexEnvfv ( target, pname, params ) ; +} + +void xglGetTexEnviv ( GLenum target, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetTexEnviv") ) + fprintf ( xglTraceFd, " /* glGetTexEnviv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexEnviv") ) + glGetTexEnviv ( target, pname, params ) ; +} + +void xglGetTexGendv ( GLenum coord, GLenum pname, GLdouble* params ) +{ + if ( xglTraceIsEnabled("glGetTexGendv") ) + fprintf ( xglTraceFd, " /* glGetTexGendv ( (GLenum)%s, (GLenum)%s, (GLdouble *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexGendv") ) + glGetTexGendv ( coord, pname, params ) ; +} + +void xglGetTexGenfv ( GLenum coord, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetTexGenfv") ) + fprintf ( xglTraceFd, " /* glGetTexGenfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexGenfv") ) + glGetTexGenfv ( coord, pname, params ) ; +} + +void xglGetTexGeniv ( GLenum coord, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetTexGeniv") ) + fprintf ( xglTraceFd, " /* glGetTexGeniv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexGeniv") ) + glGetTexGeniv ( coord, pname, params ) ; +} + +void xglGetTexImage ( GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels ) +{ + if ( xglTraceIsEnabled("glGetTexImage") ) + fprintf ( xglTraceFd, " /* glGetTexImage ( (GLenum)%s, (GLint)%d, (GLenum)%s, (GLenum)%s, (GLvoid *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), level, xglExpandGLenum ( (GLenum) format ), xglExpandGLenum ( (GLenum) type ), pixels ) ; + if ( xglExecuteIsEnabled("glGetTexImage") ) + glGetTexImage ( target, level, format, type, pixels ) ; +} + +void xglGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetTexLevelParameterfv") ) + fprintf ( xglTraceFd, " /* glGetTexLevelParameterfv ( (GLenum)%s, (GLint)%d, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), level, xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexLevelParameterfv") ) + glGetTexLevelParameterfv ( target, level, pname, params ) ; +} + +void xglGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetTexLevelParameteriv") ) + fprintf ( xglTraceFd, " /* glGetTexLevelParameteriv ( (GLenum)%s, (GLint)%d, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), level, xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexLevelParameteriv") ) + glGetTexLevelParameteriv ( target, level, pname, params ) ; +} + +void xglGetTexParameterfv ( GLenum target, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glGetTexParameterfv") ) + fprintf ( xglTraceFd, " /* glGetTexParameterfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexParameterfv") ) + glGetTexParameterfv ( target, pname, params ) ; +} + +void xglGetTexParameteriv ( GLenum target, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glGetTexParameteriv") ) + fprintf ( xglTraceFd, " /* glGetTexParameteriv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ; */\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glGetTexParameteriv") ) + glGetTexParameteriv ( target, pname, params ) ; +} + +void xglHint ( GLenum target, GLenum mode ) +{ + if ( xglTraceIsEnabled("glHint") ) + fprintf ( xglTraceFd, " glHint ( (GLenum)%s, (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glHint") ) + glHint ( target, mode ) ; +} + +void xglIndexMask ( GLuint mask ) +{ + if ( xglTraceIsEnabled("glIndexMask") ) + fprintf ( xglTraceFd, " glIndexMask ( (GLuint)%u ) ;\n" , mask ) ; + if ( xglExecuteIsEnabled("glIndexMask") ) + glIndexMask ( mask ) ; +} + +void xglIndexPointerEXT ( GLenum type, GLsizei stride, GLsizei count, void* ptr ) +{ + if ( xglTraceIsEnabled("glIndexPointerEXT") ) + fprintf ( xglTraceFd, " glIndexPointerEXT ( (GLenum)%s, (GLsizei)%d, (GLsizei)%d, (void *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) type ), stride, count, ptr ) ; +#ifdef GL_VERSION_1_1 + glIndexPointer ( type, stride, ptr ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glIndexPointerEXT") ) + glIndexPointerEXT ( type, stride, count, ptr ) ; +#else + fprintf ( xglTraceFd, " glIndexPointerEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglIndexd ( GLdouble c ) +{ + if ( xglTraceIsEnabled("glIndexd") ) + fprintf ( xglTraceFd, " glIndexd ( (GLdouble)%f ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexd") ) + glIndexd ( c ) ; +} + +void xglIndexdv ( GLdouble* c ) +{ + if ( xglTraceIsEnabled("glIndexdv") ) + fprintf ( xglTraceFd, " glIndexdv ( (GLdouble *)0x%08x ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexdv") ) + glIndexdv ( c ) ; +} + +void xglIndexf ( GLfloat c ) +{ + if ( xglTraceIsEnabled("glIndexf") ) + fprintf ( xglTraceFd, " glIndexf ( (GLfloat)%ff ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexf") ) + glIndexf ( c ) ; +} + +void xglIndexfv ( GLfloat* c ) +{ + if ( xglTraceIsEnabled("glIndexfv") ) + fprintf ( xglTraceFd, " glIndexfv ( (GLfloat *)0x%08x ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexfv") ) + glIndexfv ( c ) ; +} + +void xglIndexi ( GLint c ) +{ + if ( xglTraceIsEnabled("glIndexi") ) + fprintf ( xglTraceFd, " glIndexi ( (GLint)%d ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexi") ) + glIndexi ( c ) ; +} + +void xglIndexiv ( GLint* c ) +{ + if ( xglTraceIsEnabled("glIndexiv") ) + fprintf ( xglTraceFd, " glIndexiv ( (GLint *)0x%08x ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexiv") ) + glIndexiv ( c ) ; +} + +void xglIndexs ( GLshort c ) +{ + if ( xglTraceIsEnabled("glIndexs") ) + fprintf ( xglTraceFd, " glIndexs ( (GLshort)%d ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexs") ) + glIndexs ( c ) ; +} + +void xglIndexsv ( GLshort* c ) +{ + if ( xglTraceIsEnabled("glIndexsv") ) + fprintf ( xglTraceFd, " glIndexsv ( (GLshort *)0x%08x ) ;\n" , c ) ; + if ( xglExecuteIsEnabled("glIndexsv") ) + glIndexsv ( c ) ; +} + +void xglInitNames ( ) +{ + if ( xglTraceIsEnabled("glInitNames") ) + fprintf ( xglTraceFd, " glInitNames ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glInitNames") ) + glInitNames ( ) ; +} + +void xglLightModelf ( GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glLightModelf") ) + fprintf ( xglTraceFd, " glLightModelf ( (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glLightModelf") ) + glLightModelf ( pname, param ) ; +} + +void xglLightModelfv ( GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glLightModelfv") ) + fprintf ( xglTraceFd, " glLightModelfv ( (GLenum)%s, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glLightModelfv") ) + glLightModelfv ( pname, params ) ; +} + +void xglLightModeli ( GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glLightModeli") ) + fprintf ( xglTraceFd, " glLightModeli ( (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glLightModeli") ) + glLightModeli ( pname, param ) ; +} + +void xglLightModeliv ( GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glLightModeliv") ) + fprintf ( xglTraceFd, " glLightModeliv ( (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glLightModeliv") ) + glLightModeliv ( pname, params ) ; +} + +void xglLightf ( GLenum light, GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glLightf") ) + fprintf ( xglTraceFd, " glLightf ( (GLenum)%s, (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) light ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glLightf") ) + glLightf ( light, pname, param ) ; +} + +void xglLightfv ( GLenum light, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glLightfv") ) + fprintf ( xglTraceFd, " glLightfv ( (GLenum)%s, (GLenum)%s, xglBuild4fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n", + xglExpandGLenum ( (GLenum) light ), xglExpandGLenum ( (GLenum) pname ), params[0], params[1], params[2], params[3] ) ; + if ( xglExecuteIsEnabled("glLightfv") ) + glLightfv ( light, pname, params ) ; +} + +void xglLighti ( GLenum light, GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glLighti") ) + fprintf ( xglTraceFd, " glLighti ( (GLenum)%s, (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) light ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glLighti") ) + glLighti ( light, pname, param ) ; +} + +void xglLightiv ( GLenum light, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glLightiv") ) + fprintf ( xglTraceFd, " glLightiv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) light ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glLightiv") ) + glLightiv ( light, pname, params ) ; +} + +void xglLineStipple ( GLint factor, GLushort pattern ) +{ + if ( xglTraceIsEnabled("glLineStipple") ) + fprintf ( xglTraceFd, " glLineStipple ( (GLint)%d, (GLushort)%u ) ;\n" , factor, pattern ) ; + if ( xglExecuteIsEnabled("glLineStipple") ) + glLineStipple ( factor, pattern ) ; +} + +void xglLineWidth ( GLfloat width ) +{ + if ( xglTraceIsEnabled("glLineWidth") ) + fprintf ( xglTraceFd, " glLineWidth ( (GLfloat)%ff ) ;\n" , width ) ; + if ( xglExecuteIsEnabled("glLineWidth") ) + glLineWidth ( width ) ; +} + +void xglListBase ( GLuint base ) +{ + if ( xglTraceIsEnabled("glListBase") ) + fprintf ( xglTraceFd, " glListBase ( (GLuint)%u ) ;\n" , base ) ; + if ( xglExecuteIsEnabled("glListBase") ) + glListBase ( base ) ; +} + +void xglLoadIdentity ( ) +{ + if ( xglTraceIsEnabled("glLoadIdentity") ) + fprintf ( xglTraceFd, " glLoadIdentity ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glLoadIdentity") ) + glLoadIdentity ( ) ; +} + +void xglLoadMatrixd ( GLdouble* m ) +{ + if ( xglTraceIsEnabled("glLoadMatrixd") ) + { + fprintf ( xglTraceFd, " glLoadMatrixd ( xglBuildMatrixd(%f,%f,%f,%f,\n" , m[ 0],m[ 1],m[ 2],m[ 3] ) ; + fprintf ( xglTraceFd, " %f,%f,%f,%f,\n" , m[ 4],m[ 5],m[ 6],m[ 7] ) ; + fprintf ( xglTraceFd, " %f,%f,%f,%f,\n" , m[ 8],m[ 9],m[10],m[11] ) ; + fprintf ( xglTraceFd, " %f,%f,%f,%f) ) ;\n", m[12],m[13],m[14],m[15] ) ; + } + + if ( xglExecuteIsEnabled("glLoadMatrixd") ) + glLoadMatrixd ( m ) ; +} + +void xglLoadMatrixf ( GLfloat* m ) +{ + if ( xglTraceIsEnabled("glLoadMatrixf") ) + { + fprintf ( xglTraceFd, " glLoadMatrixf ( xglBuildMatrixf(%ff,%ff,%ff,%ff,\n" , m[ 0],m[ 1],m[ 2],m[ 3] ) ; + fprintf ( xglTraceFd, " %ff,%ff,%ff,%ff,\n" , m[ 4],m[ 5],m[ 6],m[ 7] ) ; + fprintf ( xglTraceFd, " %ff,%ff,%ff,%ff,\n" , m[ 8],m[ 9],m[10],m[11] ) ; + fprintf ( xglTraceFd, " %ff,%ff,%ff,%ff) ) ;\n", m[12],m[13],m[14],m[15] ) ; + } + + if ( xglExecuteIsEnabled("glLoadMatrixf") ) + glLoadMatrixf ( m ) ; +} + +void xglLoadName ( GLuint name ) +{ + if ( xglTraceIsEnabled("glLoadName") ) + fprintf ( xglTraceFd, " glLoadName ( (GLuint)%u ) ;\n" , name ) ; + if ( xglExecuteIsEnabled("glLoadName") ) + glLoadName ( name ) ; +} + +void xglLogicOp ( GLenum opcode ) +{ + if ( xglTraceIsEnabled("glLogicOp") ) + fprintf ( xglTraceFd, " glLogicOp ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) opcode ) ) ; + if ( xglExecuteIsEnabled("glLogicOp") ) + glLogicOp ( opcode ) ; +} + +void xglMap1d ( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble* points ) +{ + if ( xglTraceIsEnabled("glMap1d") ) + fprintf ( xglTraceFd, " glMap1d ( (GLenum)%s, (GLdouble)%f, (GLdouble)%f, (GLint)%d, (GLint)%d, (GLdouble *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), u1, u2, stride, order, points ) ; + if ( xglExecuteIsEnabled("glMap1d") ) + glMap1d ( target, u1, u2, stride, order, points ) ; +} + +void xglMap1f ( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat* points ) +{ + if ( xglTraceIsEnabled("glMap1f") ) + fprintf ( xglTraceFd, " glMap1f ( (GLenum)%s, (GLfloat)%ff, (GLfloat)%ff, (GLint)%d, (GLint)%d, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), u1, u2, stride, order, points ) ; + if ( xglExecuteIsEnabled("glMap1f") ) + glMap1f ( target, u1, u2, stride, order, points ) ; +} + +void xglMap2d ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble* points ) +{ + if ( xglTraceIsEnabled("glMap2d") ) + fprintf ( xglTraceFd, " glMap2d ( (GLenum)%s, (GLdouble)%f, (GLdouble)%f, (GLint)%d, (GLint)%d, (GLdouble)%f, (GLdouble)%f, (GLint)%d, (GLint)%d, (GLdouble *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ) ; + if ( xglExecuteIsEnabled("glMap2d") ) + glMap2d ( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ) ; +} + +void xglMap2f ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat* points ) +{ + if ( xglTraceIsEnabled("glMap2f") ) + fprintf ( xglTraceFd, " glMap2f ( (GLenum)%s, (GLfloat)%ff, (GLfloat)%ff, (GLint)%d, (GLint)%d, (GLfloat)%ff, (GLfloat)%ff, (GLint)%d, (GLint)%d, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ) ; + if ( xglExecuteIsEnabled("glMap2f") ) + glMap2f ( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ) ; +} + +void xglMapGrid1d ( GLint un, GLdouble u1, GLdouble u2 ) +{ + if ( xglTraceIsEnabled("glMapGrid1d") ) + fprintf ( xglTraceFd, " glMapGrid1d ( (GLint)%d, (GLdouble)%f, (GLdouble)%f ) ;\n" , un, u1, u2 ) ; + if ( xglExecuteIsEnabled("glMapGrid1d") ) + glMapGrid1d ( un, u1, u2 ) ; +} + +void xglMapGrid1f ( GLint un, GLfloat u1, GLfloat u2 ) +{ + if ( xglTraceIsEnabled("glMapGrid1f") ) + fprintf ( xglTraceFd, " glMapGrid1f ( (GLint)%d, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , un, u1, u2 ) ; + if ( xglExecuteIsEnabled("glMapGrid1f") ) + glMapGrid1f ( un, u1, u2 ) ; +} + +void xglMapGrid2d ( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ) +{ + if ( xglTraceIsEnabled("glMapGrid2d") ) + fprintf ( xglTraceFd, " glMapGrid2d ( (GLint)%d, (GLdouble)%f, (GLdouble)%f, (GLint)%d, (GLdouble)%f, (GLdouble)%f ) ;\n" , un, u1, u2, vn, v1, v2 ) ; + if ( xglExecuteIsEnabled("glMapGrid2d") ) + glMapGrid2d ( un, u1, u2, vn, v1, v2 ) ; +} + +void xglMapGrid2f ( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ) +{ + if ( xglTraceIsEnabled("glMapGrid2f") ) + fprintf ( xglTraceFd, " glMapGrid2f ( (GLint)%d, (GLfloat)%ff, (GLfloat)%ff, (GLint)%d, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , un, u1, u2, vn, v1, v2 ) ; + if ( xglExecuteIsEnabled("glMapGrid2f") ) + glMapGrid2f ( un, u1, u2, vn, v1, v2 ) ; +} + +void xglMaterialf ( GLenum face, GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glMaterialf") ) + fprintf ( xglTraceFd, " glMaterialf ( (GLenum)%s, (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glMaterialf") ) + glMaterialf ( face, pname, param ) ; +} + +void xglMaterialfv ( GLenum face, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glMaterialfv") ) + fprintf ( xglTraceFd, " glMaterialfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glMaterialfv") ) + glMaterialfv ( face, pname, params ) ; +} + +void xglMateriali ( GLenum face, GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glMateriali") ) + fprintf ( xglTraceFd, " glMateriali ( (GLenum)%s, (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glMateriali") ) + glMateriali ( face, pname, param ) ; +} + +void xglMaterialiv ( GLenum face, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glMaterialiv") ) + fprintf ( xglTraceFd, " glMaterialiv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glMaterialiv") ) + glMaterialiv ( face, pname, params ) ; +} + +void xglMatrixMode ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glMatrixMode") ) + fprintf ( xglTraceFd, " glMatrixMode ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glMatrixMode") ) + glMatrixMode ( mode ) ; +} + + +void xglMultMatrixd ( GLdouble* m ) +{ + if ( xglTraceIsEnabled("glMultMatrixd") ) + { + fprintf ( xglTraceFd, " glMultMatrixd ( xglBuildMatrixd(%f,%f,%f,%f,\n" , m[ 0],m[ 1],m[ 2],m[ 3] ) ; + fprintf ( xglTraceFd, " %f,%f,%f,%f,\n" , m[ 4],m[ 5],m[ 6],m[ 7] ) ; + fprintf ( xglTraceFd, " %f,%f,%f,%f,\n" , m[ 8],m[ 9],m[10],m[11] ) ; + fprintf ( xglTraceFd, " %f,%f,%f,%f) ) ;\n", m[12],m[13],m[14],m[15] ) ; + } + + if ( xglExecuteIsEnabled("glMultMatrixd") ) + glMultMatrixd ( m ) ; +} + +void xglMultMatrixf ( GLfloat* m ) +{ + if ( xglTraceIsEnabled("glMultMatrixf") ) + { + fprintf ( xglTraceFd, " glMultMatrixf ( xglBuildMatrixf(%ff,%ff,%ff,%ff,\n" , m[ 0],m[ 1],m[ 2],m[ 3] ) ; + fprintf ( xglTraceFd, " %ff,%ff,%ff,%ff,\n" , m[ 4],m[ 5],m[ 6],m[ 7] ) ; + fprintf ( xglTraceFd, " %ff,%ff,%ff,%ff,\n" , m[ 8],m[ 9],m[10],m[11] ) ; + fprintf ( xglTraceFd, " %ff,%ff,%ff,%ff) ) ;\n", m[12],m[13],m[14],m[15] ) ; + } + + if ( xglExecuteIsEnabled("glMultMatrixf") ) + glMultMatrixf ( m ) ; +} + +void xglNewList ( GLuint list, GLenum mode ) +{ + if ( xglTraceIsEnabled("glNewList") ) + fprintf ( xglTraceFd, " glNewList ( (GLuint)%u, (GLenum)%s ) ;\n" , list, xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glNewList") ) + glNewList ( list, mode ) ; +} + +void xglNormal3b ( GLbyte nx, GLbyte ny, GLbyte nz ) +{ + if ( xglTraceIsEnabled("glNormal3b") ) + fprintf ( xglTraceFd, " glNormal3b ( (GLbyte)%d, (GLbyte)%d, (GLbyte)%d ) ;\n" , nx, ny, nz ) ; + if ( xglExecuteIsEnabled("glNormal3b") ) + glNormal3b ( nx, ny, nz ) ; +} + +void xglNormal3bv ( GLbyte* v ) +{ + if ( xglTraceIsEnabled("glNormal3bv") ) + fprintf ( xglTraceFd, " glNormal3bv ( xglBuild3bv((GLbyte)%d,(GLbyte)%d,(GLbyte)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glNormal3bv") ) + glNormal3bv ( v ) ; +} + +void xglNormal3d ( GLdouble nx, GLdouble ny, GLdouble nz ) +{ + if ( xglTraceIsEnabled("glNormal3d") ) + fprintf ( xglTraceFd, " glNormal3d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , nx, ny, nz ) ; + if ( xglExecuteIsEnabled("glNormal3d") ) + glNormal3d ( nx, ny, nz ) ; +} + +void xglNormal3dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glNormal3dv") ) + fprintf ( xglTraceFd, " glNormal3dv ( xglBuild3dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glNormal3dv") ) + glNormal3dv ( v ) ; +} + +void xglNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) +{ + if ( xglTraceIsEnabled("glNormal3f") ) + fprintf ( xglTraceFd, " glNormal3f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , nx, ny, nz ) ; + if ( xglExecuteIsEnabled("glNormal3f") ) + glNormal3f ( nx, ny, nz ) ; +} + +void xglNormal3fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glNormal3fv") ) + fprintf ( xglTraceFd, " glNormal3fv ( xglBuild3fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glNormal3fv") ) + glNormal3fv ( v ) ; +} + +void xglNormal3i ( GLint nx, GLint ny, GLint nz ) +{ + if ( xglTraceIsEnabled("glNormal3i") ) + fprintf ( xglTraceFd, " glNormal3i ( (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , nx, ny, nz ) ; + if ( xglExecuteIsEnabled("glNormal3i") ) + glNormal3i ( nx, ny, nz ) ; +} + +void xglNormal3iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glNormal3iv") ) + fprintf ( xglTraceFd, " glNormal3iv ( xglBuild3iv((GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glNormal3iv") ) + glNormal3iv ( v ) ; +} + +void xglNormal3s ( GLshort nx, GLshort ny, GLshort nz ) +{ + if ( xglTraceIsEnabled("glNormal3s") ) + fprintf ( xglTraceFd, " glNormal3s ( (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , nx, ny, nz ) ; + if ( xglExecuteIsEnabled("glNormal3s") ) + glNormal3s ( nx, ny, nz ) ; +} + +void xglNormal3sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glNormal3sv") ) + fprintf ( xglTraceFd, " glNormal3sv ( xglBuild3sv((GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glNormal3sv") ) + glNormal3sv ( v ) ; +} + +void xglNormalPointerEXT ( GLenum type, GLsizei stride, GLsizei count, void* ptr ) +{ + if ( xglTraceIsEnabled("glNormalPointerEXT") ) + fprintf ( xglTraceFd, " glNormalPointerEXT ( (GLenum)%s, (GLsizei)%d, (GLsizei)%d, (void *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) type ), stride, count, ptr ) ; +#ifdef GL_VERSION_1_1 + glNormalPointer ( type, stride, ptr ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glNormalPointerEXT") ) + glNormalPointerEXT ( type, stride, count, ptr ) ; +#else + fprintf ( xglTraceFd, " glNormalPointerEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglOrtho ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) +{ + if ( xglTraceIsEnabled("glOrtho") ) + fprintf ( xglTraceFd, " glOrtho ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , left, right, bottom, top, near_val, far_val ) ; + if ( xglExecuteIsEnabled("glOrtho") ) + glOrtho ( left, right, bottom, top, near_val, far_val ) ; +} + +void xglPassThrough ( GLfloat token ) +{ + if ( xglTraceIsEnabled("glPassThrough") ) + fprintf ( xglTraceFd, " glPassThrough ( (GLfloat)%ff ) ;\n" , token ) ; + if ( xglExecuteIsEnabled("glPassThrough") ) + glPassThrough ( token ) ; +} + +void xglPixelMapfv ( GLenum map, GLint mapsize, GLfloat* values ) +{ + if ( xglTraceIsEnabled("glPixelMapfv") ) + fprintf ( xglTraceFd, " glPixelMapfv ( (GLenum)%s, (GLint)%d, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) map ), mapsize, values ) ; + if ( xglExecuteIsEnabled("glPixelMapfv") ) + glPixelMapfv ( map, mapsize, values ) ; +} + +void xglPixelMapuiv ( GLenum map, GLint mapsize, GLuint* values ) +{ + if ( xglTraceIsEnabled("glPixelMapuiv") ) + fprintf ( xglTraceFd, " glPixelMapuiv ( (GLenum)%s, (GLint)%d, (GLuint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) map ), mapsize, values ) ; + if ( xglExecuteIsEnabled("glPixelMapuiv") ) + glPixelMapuiv ( map, mapsize, values ) ; +} + +void xglPixelMapusv ( GLenum map, GLint mapsize, GLushort* values ) +{ + if ( xglTraceIsEnabled("glPixelMapusv") ) + fprintf ( xglTraceFd, " glPixelMapusv ( (GLenum)%s, (GLint)%d, (GLushort *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) map ), mapsize, values ) ; + if ( xglExecuteIsEnabled("glPixelMapusv") ) + glPixelMapusv ( map, mapsize, values ) ; +} + +void xglPixelStoref ( GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glPixelStoref") ) + fprintf ( xglTraceFd, " glPixelStoref ( (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glPixelStoref") ) + glPixelStoref ( pname, param ) ; +} + +void xglPixelStorei ( GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glPixelStorei") ) + fprintf ( xglTraceFd, " glPixelStorei ( (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glPixelStorei") ) + glPixelStorei ( pname, param ) ; +} + +void xglPixelTransferf ( GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glPixelTransferf") ) + fprintf ( xglTraceFd, " glPixelTransferf ( (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glPixelTransferf") ) + glPixelTransferf ( pname, param ) ; +} + +void xglPixelTransferi ( GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glPixelTransferi") ) + fprintf ( xglTraceFd, " glPixelTransferi ( (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glPixelTransferi") ) + glPixelTransferi ( pname, param ) ; +} + +void xglPixelZoom ( GLfloat xfactor, GLfloat yfactor ) +{ + if ( xglTraceIsEnabled("glPixelZoom") ) + fprintf ( xglTraceFd, " glPixelZoom ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , xfactor, yfactor ) ; + if ( xglExecuteIsEnabled("glPixelZoom") ) + glPixelZoom ( xfactor, yfactor ) ; +} + +void xglPointSize ( GLfloat size ) +{ + if ( xglTraceIsEnabled("glPointSize") ) + fprintf ( xglTraceFd, " glPointSize ( (GLfloat)%ff ) ;\n" , size ) ; + if ( xglExecuteIsEnabled("glPointSize") ) + glPointSize ( size ) ; +} + +void xglPolygonMode ( GLenum face, GLenum mode ) +{ + if ( xglTraceIsEnabled("glPolygonMode") ) + fprintf ( xglTraceFd, " glPolygonMode ( (GLenum)%s, (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) face ), xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glPolygonMode") ) + glPolygonMode ( face, mode ) ; +} + +void xglPolygonOffsetEXT ( GLfloat factor, GLfloat bias ) +{ + if ( xglTraceIsEnabled("glPolygonOffsetEXT") ) + fprintf ( xglTraceFd, " glPolygonOffsetEXT ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , factor, bias ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glPolygonOffsetEXT") ) + glPolygonOffset ( factor, bias ) ; +#else +#ifdef GL_EXT_polygon_offset + if ( xglExecuteIsEnabled("glPolygonOffsetEXT") ) + glPolygonOffsetEXT ( factor, bias ) ; +#else + fprintf ( xglTraceFd, " glPolygonOffsetEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglPolygonOffset ( GLfloat factor, GLfloat bias ) +{ + if ( xglTraceIsEnabled("glPolygonOffset") ) + fprintf ( xglTraceFd, " glPolygonOffset ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , factor, bias ) ; +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glPolygonOffset") ) + glPolygonOffset ( factor, bias ) ; +#else +#ifdef GL_EXT_polygon_offset + if ( xglExecuteIsEnabled("glPolygonOffset") ) + glPolygonOffsetEXT ( factor, bias ) ; +#else + fprintf ( xglTraceFd, " glPolygonOffsetEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglPolygonStipple ( GLubyte* mask ) +{ + if ( xglTraceIsEnabled("glPolygonStipple") ) + fprintf ( xglTraceFd, " glPolygonStipple ( (GLubyte *)0x%08x ) ;\n" , mask ) ; + if ( xglExecuteIsEnabled("glPolygonStipple") ) + glPolygonStipple ( mask ) ; +} + +void xglPopAttrib ( ) +{ + if ( xglTraceIsEnabled("glPopAttrib") ) + fprintf ( xglTraceFd, " glPopAttrib ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glPopAttrib") ) + glPopAttrib ( ) ; +} + +void xglPopMatrix ( ) +{ + if ( xglTraceIsEnabled("glPopMatrix") ) + fprintf ( xglTraceFd, " glPopMatrix ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glPopMatrix") ) + glPopMatrix ( ) ; +} + +void xglPopName ( ) +{ + if ( xglTraceIsEnabled("glPopName") ) + fprintf ( xglTraceFd, " glPopName ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glPopName") ) + glPopName ( ) ; +} + +void xglPushAttrib ( GLbitfield mask ) +{ + if ( xglTraceIsEnabled("glPushAttrib") ) + fprintf ( xglTraceFd, " glPushAttrib ( (GLbitfield)0x%08x ) ;\n" , mask ) ; + if ( xglExecuteIsEnabled("glPushAttrib") ) + glPushAttrib ( mask ) ; +} + +void xglPushMatrix ( ) +{ + if ( xglTraceIsEnabled("glPushMatrix") ) + fprintf ( xglTraceFd, " glPushMatrix ( ) ;\n" ) ; + if ( xglExecuteIsEnabled("glPushMatrix") ) + glPushMatrix ( ) ; +} + +void xglPushName ( GLuint name ) +{ + if ( xglTraceIsEnabled("glPushName") ) + fprintf ( xglTraceFd, " glPushName ( (GLuint)%u ) ;\n" , name ) ; + if ( xglExecuteIsEnabled("glPushName") ) + glPushName ( name ) ; +} + +void xglRasterPos2d ( GLdouble x, GLdouble y ) +{ + if ( xglTraceIsEnabled("glRasterPos2d") ) + fprintf ( xglTraceFd, " glRasterPos2d ( (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glRasterPos2d") ) + glRasterPos2d ( x, y ) ; +} + +void xglRasterPos2dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glRasterPos2dv") ) + fprintf ( xglTraceFd, " glRasterPos2dv ( xglBuild2dv((GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glRasterPos2dv") ) + glRasterPos2dv ( v ) ; +} + +void xglRasterPos2f ( GLfloat x, GLfloat y ) +{ + if ( xglTraceIsEnabled("glRasterPos2f") ) + fprintf ( xglTraceFd, " glRasterPos2f ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glRasterPos2f") ) + glRasterPos2f ( x, y ) ; +} + +void xglRasterPos2fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glRasterPos2fv") ) + fprintf ( xglTraceFd, " glRasterPos2fv ( xglBuild2fv((GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glRasterPos2fv") ) + glRasterPos2fv ( v ) ; +} + +void xglRasterPos2i ( GLint x, GLint y ) +{ + if ( xglTraceIsEnabled("glRasterPos2i") ) + fprintf ( xglTraceFd, " glRasterPos2i ( (GLint)%d, (GLint)%d ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glRasterPos2i") ) + glRasterPos2i ( x, y ) ; +} + +void xglRasterPos2iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glRasterPos2iv") ) + fprintf ( xglTraceFd, " glRasterPos2iv ( xglBuild2iv((GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glRasterPos2iv") ) + glRasterPos2iv ( v ) ; +} + +void xglRasterPos2s ( GLshort x, GLshort y ) +{ + if ( xglTraceIsEnabled("glRasterPos2s") ) + fprintf ( xglTraceFd, " glRasterPos2s ( (GLshort)%d, (GLshort)%d ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glRasterPos2s") ) + glRasterPos2s ( x, y ) ; +} + +void xglRasterPos2sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glRasterPos2sv") ) + fprintf ( xglTraceFd, " glRasterPos2sv ( xglBuild2sv((GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glRasterPos2sv") ) + glRasterPos2sv ( v ) ; +} + +void xglRasterPos3d ( GLdouble x, GLdouble y, GLdouble z ) +{ + if ( xglTraceIsEnabled("glRasterPos3d") ) + fprintf ( xglTraceFd, " glRasterPos3d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glRasterPos3d") ) + glRasterPos3d ( x, y, z ) ; +} + +void xglRasterPos3dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glRasterPos3dv") ) + fprintf ( xglTraceFd, " glRasterPos3dv ( xglBuild3dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glRasterPos3dv") ) + glRasterPos3dv ( v ) ; +} + +void xglRasterPos3f ( GLfloat x, GLfloat y, GLfloat z ) +{ + if ( xglTraceIsEnabled("glRasterPos3f") ) + fprintf ( xglTraceFd, " glRasterPos3f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glRasterPos3f") ) + glRasterPos3f ( x, y, z ) ; +} + +void xglRasterPos3fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glRasterPos3fv") ) + fprintf ( xglTraceFd, " glRasterPos3fv ( xglBuild3fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glRasterPos3fv") ) + glRasterPos3fv ( v ) ; +} + +void xglRasterPos3i ( GLint x, GLint y, GLint z ) +{ + if ( xglTraceIsEnabled("glRasterPos3i") ) + fprintf ( xglTraceFd, " glRasterPos3i ( (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glRasterPos3i") ) + glRasterPos3i ( x, y, z ) ; +} + +void xglRasterPos3iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glRasterPos3iv") ) + fprintf ( xglTraceFd, " glRasterPos3iv ( xglBuild3iv((GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glRasterPos3iv") ) + glRasterPos3iv ( v ) ; +} + +void xglRasterPos3s ( GLshort x, GLshort y, GLshort z ) +{ + if ( xglTraceIsEnabled("glRasterPos3s") ) + fprintf ( xglTraceFd, " glRasterPos3s ( (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glRasterPos3s") ) + glRasterPos3s ( x, y, z ) ; +} + +void xglRasterPos3sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glRasterPos3sv") ) + fprintf ( xglTraceFd, " glRasterPos3sv ( xglBuild3sv((GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glRasterPos3sv") ) + glRasterPos3sv ( v ) ; +} + +void xglRasterPos4d ( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) +{ + if ( xglTraceIsEnabled("glRasterPos4d") ) + fprintf ( xglTraceFd, " glRasterPos4d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glRasterPos4d") ) + glRasterPos4d ( x, y, z, w ) ; +} + +void xglRasterPos4dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glRasterPos4dv") ) + fprintf ( xglTraceFd, " glRasterPos4dv ( xglBuild4dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glRasterPos4dv") ) + glRasterPos4dv ( v ) ; +} + +void xglRasterPos4f ( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +{ + if ( xglTraceIsEnabled("glRasterPos4f") ) + fprintf ( xglTraceFd, " glRasterPos4f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glRasterPos4f") ) + glRasterPos4f ( x, y, z, w ) ; +} + +void xglRasterPos4fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glRasterPos4fv") ) + fprintf ( xglTraceFd, " glRasterPos4fv ( xglBuild4fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glRasterPos4fv") ) + glRasterPos4fv ( v ) ; +} + +void xglRasterPos4i ( GLint x, GLint y, GLint z, GLint w ) +{ + if ( xglTraceIsEnabled("glRasterPos4i") ) + fprintf ( xglTraceFd, " glRasterPos4i ( (GLint)%d, (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glRasterPos4i") ) + glRasterPos4i ( x, y, z, w ) ; +} + +void xglRasterPos4iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glRasterPos4iv") ) + fprintf ( xglTraceFd, " glRasterPos4iv ( xglBuild4iv((GLint)%d,(GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glRasterPos4iv") ) + glRasterPos4iv ( v ) ; +} + +void xglRasterPos4s ( GLshort x, GLshort y, GLshort z, GLshort w ) +{ + if ( xglTraceIsEnabled("glRasterPos4s") ) + fprintf ( xglTraceFd, " glRasterPos4s ( (GLshort)%d, (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glRasterPos4s") ) + glRasterPos4s ( x, y, z, w ) ; +} + +void xglRasterPos4sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glRasterPos4sv") ) + fprintf ( xglTraceFd, " glRasterPos4sv ( xglBuild4sv((GLshort)%d,(GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glRasterPos4sv") ) + glRasterPos4sv ( v ) ; +} + +void xglReadBuffer ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glReadBuffer") ) + fprintf ( xglTraceFd, " glReadBuffer ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glReadBuffer") ) + glReadBuffer ( mode ) ; +} + +void xglReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels ) +{ + if ( xglTraceIsEnabled("glReadPixels") ) + fprintf ( xglTraceFd, " glReadPixels ( (GLint)%d, (GLint)%d, (GLsizei)%d, (GLsizei)%d, (GLenum)%s, (GLenum)%s, (GLvoid *)0x%08x ) ;\n" , x, y, width, height, xglExpandGLenum ( (GLenum) format ), xglExpandGLenum ( (GLenum) type ), pixels ) ; + if ( xglExecuteIsEnabled("glReadPixels") ) + glReadPixels ( x, y, width, height, format, type, pixels ) ; +} + +void xglRectd ( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ) +{ + if ( xglTraceIsEnabled("glRectd") ) + fprintf ( xglTraceFd, " glRectd ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x1, y1, x2, y2 ) ; + if ( xglExecuteIsEnabled("glRectd") ) + glRectd ( x1, y1, x2, y2 ) ; +} + +void xglRectdv ( GLdouble* v1, GLdouble* v2 ) +{ + if ( xglTraceIsEnabled("glRectdv") ) + fprintf ( xglTraceFd, " glRectdv ( (GLdouble *)0x%08x, (GLdouble *)0x%08x ) ;\n" , v1, v2 ) ; + if ( xglExecuteIsEnabled("glRectdv") ) + glRectdv ( v1, v2 ) ; +} + +void xglRectf ( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) +{ + if ( xglTraceIsEnabled("glRectf") ) + fprintf ( xglTraceFd, " glRectf ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x1, y1, x2, y2 ) ; + if ( xglExecuteIsEnabled("glRectf") ) + glRectf ( x1, y1, x2, y2 ) ; +} + +void xglRectfv ( GLfloat* v1, GLfloat* v2 ) +{ + if ( xglTraceIsEnabled("glRectfv") ) + fprintf ( xglTraceFd, " glRectfv ( (GLfloat *)0x%08x, (GLfloat *)0x%08x ) ;\n" , v1, v2 ) ; + if ( xglExecuteIsEnabled("glRectfv") ) + glRectfv ( v1, v2 ) ; +} + +void xglRecti ( GLint x1, GLint y1, GLint x2, GLint y2 ) +{ + if ( xglTraceIsEnabled("glRecti") ) + fprintf ( xglTraceFd, " glRecti ( (GLint)%d, (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , x1, y1, x2, y2 ) ; + if ( xglExecuteIsEnabled("glRecti") ) + glRecti ( x1, y1, x2, y2 ) ; +} + +void xglRectiv ( GLint* v1, GLint* v2 ) +{ + if ( xglTraceIsEnabled("glRectiv") ) + fprintf ( xglTraceFd, " glRectiv ( (GLint *)0x%08x, (GLint *)0x%08x ) ;\n" , v1, v2 ) ; + if ( xglExecuteIsEnabled("glRectiv") ) + glRectiv ( v1, v2 ) ; +} + +void xglRects ( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ) +{ + if ( xglTraceIsEnabled("glRects") ) + fprintf ( xglTraceFd, " glRects ( (GLshort)%d, (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , x1, y1, x2, y2 ) ; + if ( xglExecuteIsEnabled("glRects") ) + glRects ( x1, y1, x2, y2 ) ; +} + +void xglRectsv ( GLshort* v1, GLshort* v2 ) +{ + if ( xglTraceIsEnabled("glRectsv") ) + fprintf ( xglTraceFd, " glRectsv ( (GLshort *)0x%08x, (GLshort *)0x%08x ) ;\n" , v1, v2 ) ; + if ( xglExecuteIsEnabled("glRectsv") ) + glRectsv ( v1, v2 ) ; +} + +void xglRotated ( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ) +{ + if ( xglTraceIsEnabled("glRotated") ) + fprintf ( xglTraceFd, " glRotated ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , angle, x, y, z ) ; + if ( xglExecuteIsEnabled("glRotated") ) + glRotated ( angle, x, y, z ) ; +} + +void xglRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) +{ + if ( xglTraceIsEnabled("glRotatef") ) + fprintf ( xglTraceFd, " glRotatef ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , angle, x, y, z ) ; + if ( xglExecuteIsEnabled("glRotatef") ) + glRotatef ( angle, x, y, z ) ; +} + +void xglScaled ( GLdouble x, GLdouble y, GLdouble z ) +{ + if ( xglTraceIsEnabled("glScaled") ) + fprintf ( xglTraceFd, " glScaled ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glScaled") ) + glScaled ( x, y, z ) ; +} + +void xglScalef ( GLfloat x, GLfloat y, GLfloat z ) +{ + if ( xglTraceIsEnabled("glScalef") ) + fprintf ( xglTraceFd, " glScalef ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glScalef") ) + glScalef ( x, y, z ) ; +} + +void xglScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) +{ + if ( xglTraceIsEnabled("glScissor") ) + fprintf ( xglTraceFd, " glScissor ( (GLint)%d, (GLint)%d, (GLsizei)%d, (GLsizei)%d ) ;\n" , x, y, width, height ) ; + if ( xglExecuteIsEnabled("glScissor") ) + glScissor ( x, y, width, height ) ; +} + +void xglSelectBuffer ( GLsizei size, GLuint* buffer ) +{ + if ( xglTraceIsEnabled("glSelectBuffer") ) + fprintf ( xglTraceFd, " glSelectBuffer ( (GLsizei)%d, (GLuint *)0x%08x ) ;\n" , size, buffer ) ; + if ( xglExecuteIsEnabled("glSelectBuffer") ) + glSelectBuffer ( size, buffer ) ; +} + +void xglShadeModel ( GLenum mode ) +{ + if ( xglTraceIsEnabled("glShadeModel") ) + fprintf ( xglTraceFd, " glShadeModel ( (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) mode ) ) ; + if ( xglExecuteIsEnabled("glShadeModel") ) + glShadeModel ( mode ) ; +} + +void xglStencilFunc ( GLenum func, GLint ref, GLuint mask ) +{ + if ( xglTraceIsEnabled("glStencilFunc") ) + fprintf ( xglTraceFd, " glStencilFunc ( (GLenum)%s, (GLint)%d, (GLuint)%u ) ;\n" , xglExpandGLenum ( (GLenum) func ), ref, mask ) ; + if ( xglExecuteIsEnabled("glStencilFunc") ) + glStencilFunc ( func, ref, mask ) ; +} + +void xglStencilMask ( GLuint mask ) +{ + if ( xglTraceIsEnabled("glStencilMask") ) + fprintf ( xglTraceFd, " glStencilMask ( (GLuint)%u ) ;\n" , mask ) ; + if ( xglExecuteIsEnabled("glStencilMask") ) + glStencilMask ( mask ) ; +} + +void xglStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) +{ + if ( xglTraceIsEnabled("glStencilOp") ) + fprintf ( xglTraceFd, " glStencilOp ( (GLenum)%s, (GLenum)%s, (GLenum)%s ) ;\n" , xglExpandGLenum ( (GLenum) fail ), xglExpandGLenum ( (GLenum) zfail ), xglExpandGLenum ( (GLenum) zpass ) ) ; + if ( xglExecuteIsEnabled("glStencilOp") ) + glStencilOp ( fail, zfail, zpass ) ; +} + +void xglTexCoord1d ( GLdouble s ) +{ + if ( xglTraceIsEnabled("glTexCoord1d") ) + fprintf ( xglTraceFd, " glTexCoord1d ( (GLdouble)%f ) ;\n" , s ) ; + if ( xglExecuteIsEnabled("glTexCoord1d") ) + glTexCoord1d ( s ) ; +} + +void xglTexCoord1dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glTexCoord1dv") ) + fprintf ( xglTraceFd, " glTexCoord1dv ( xglBuild1dv((GLdouble)%f) ) ;\n" , v[0] ) ; + if ( xglExecuteIsEnabled("glTexCoord1dv") ) + glTexCoord1dv ( v ) ; +} + +void xglTexCoord1f ( GLfloat s ) +{ + if ( xglTraceIsEnabled("glTexCoord1f") ) + fprintf ( xglTraceFd, " glTexCoord1f ( (GLfloat)%ff ) ;\n" , s ) ; + if ( xglExecuteIsEnabled("glTexCoord1f") ) + glTexCoord1f ( s ) ; +} + +void xglTexCoord1fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glTexCoord1fv") ) + fprintf ( xglTraceFd, " glTexCoord1fv ( xglBuild1fv((GLfloat)%ff) ) ;\n" , v[0] ) ; + if ( xglExecuteIsEnabled("glTexCoord1fv") ) + glTexCoord1fv ( v ) ; +} + +void xglTexCoord1i ( GLint s ) +{ + if ( xglTraceIsEnabled("glTexCoord1i") ) + fprintf ( xglTraceFd, " glTexCoord1i ( (GLint)%d ) ;\n" , s ) ; + if ( xglExecuteIsEnabled("glTexCoord1i") ) + glTexCoord1i ( s ) ; +} + +void xglTexCoord1iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glTexCoord1iv") ) + fprintf ( xglTraceFd, " glTexCoord1iv ( xglBuild1iv((GLint)%d) ) ;\n" , v[0] ) ; + if ( xglExecuteIsEnabled("glTexCoord1iv") ) + glTexCoord1iv ( v ) ; +} + +void xglTexCoord1s ( GLshort s ) +{ + if ( xglTraceIsEnabled("glTexCoord1s") ) + fprintf ( xglTraceFd, " glTexCoord1s ( (GLshort)%d ) ;\n" , s ) ; + if ( xglExecuteIsEnabled("glTexCoord1s") ) + glTexCoord1s ( s ) ; +} + +void xglTexCoord1sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glTexCoord1sv") ) + fprintf ( xglTraceFd, " glTexCoord1sv ( xglBuild1sv((GLshort)%d) ) ;\n" , v[0] ) ; + if ( xglExecuteIsEnabled("glTexCoord1sv") ) + glTexCoord1sv ( v ) ; +} + +void xglTexCoord2d ( GLdouble s, GLdouble t ) +{ + if ( xglTraceIsEnabled("glTexCoord2d") ) + fprintf ( xglTraceFd, " glTexCoord2d ( (GLdouble)%f, (GLdouble)%f ) ;\n" , s, t ) ; + if ( xglExecuteIsEnabled("glTexCoord2d") ) + glTexCoord2d ( s, t ) ; +} + +void xglTexCoord2dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glTexCoord2dv") ) + fprintf ( xglTraceFd, " glTexCoord2dv ( xglBuild2dv((GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glTexCoord2dv") ) + glTexCoord2dv ( v ) ; +} + +void xglTexCoord2f ( GLfloat s, GLfloat t ) +{ + if ( xglTraceIsEnabled("glTexCoord2f") ) + fprintf ( xglTraceFd, " glTexCoord2f ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , s, t ) ; + if ( xglExecuteIsEnabled("glTexCoord2f") ) + glTexCoord2f ( s, t ) ; +} + +void xglTexCoord2fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glTexCoord2fv") ) + fprintf ( xglTraceFd, " glTexCoord2fv ( xglBuild2fv((GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glTexCoord2fv") ) + glTexCoord2fv ( v ) ; +} + +void xglTexCoord2i ( GLint s, GLint t ) +{ + if ( xglTraceIsEnabled("glTexCoord2i") ) + fprintf ( xglTraceFd, " glTexCoord2i ( (GLint)%d, (GLint)%d ) ;\n" , s, t ) ; + if ( xglExecuteIsEnabled("glTexCoord2i") ) + glTexCoord2i ( s, t ) ; +} + +void xglTexCoord2iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glTexCoord2iv") ) + fprintf ( xglTraceFd, " glTexCoord2iv ( xglBuild2iv((GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glTexCoord2iv") ) + glTexCoord2iv ( v ) ; +} + +void xglTexCoord2s ( GLshort s, GLshort t ) +{ + if ( xglTraceIsEnabled("glTexCoord2s") ) + fprintf ( xglTraceFd, " glTexCoord2s ( (GLshort)%d, (GLshort)%d ) ;\n" , s, t ) ; + if ( xglExecuteIsEnabled("glTexCoord2s") ) + glTexCoord2s ( s, t ) ; +} + +void xglTexCoord2sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glTexCoord2sv") ) + fprintf ( xglTraceFd, " glTexCoord2sv ( xglBuild2sv((GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glTexCoord2sv") ) + glTexCoord2sv ( v ) ; +} + +void xglTexCoord3d ( GLdouble s, GLdouble t, GLdouble r ) +{ + if ( xglTraceIsEnabled("glTexCoord3d") ) + fprintf ( xglTraceFd, " glTexCoord3d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , s, t, r ) ; + if ( xglExecuteIsEnabled("glTexCoord3d") ) + glTexCoord3d ( s, t, r ) ; +} + +void xglTexCoord3dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glTexCoord3dv") ) + fprintf ( xglTraceFd, " glTexCoord3dv ( xglBuild3dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glTexCoord3dv") ) + glTexCoord3dv ( v ) ; +} + +void xglTexCoord3f ( GLfloat s, GLfloat t, GLfloat r ) +{ + if ( xglTraceIsEnabled("glTexCoord3f") ) + fprintf ( xglTraceFd, " glTexCoord3f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , s, t, r ) ; + if ( xglExecuteIsEnabled("glTexCoord3f") ) + glTexCoord3f ( s, t, r ) ; +} + +void xglTexCoord3fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glTexCoord3fv") ) + fprintf ( xglTraceFd, " glTexCoord3fv ( xglBuild3fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glTexCoord3fv") ) + glTexCoord3fv ( v ) ; +} + +void xglTexCoord3i ( GLint s, GLint t, GLint r ) +{ + if ( xglTraceIsEnabled("glTexCoord3i") ) + fprintf ( xglTraceFd, " glTexCoord3i ( (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , s, t, r ) ; + if ( xglExecuteIsEnabled("glTexCoord3i") ) + glTexCoord3i ( s, t, r ) ; +} + +void xglTexCoord3iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glTexCoord3iv") ) + fprintf ( xglTraceFd, " glTexCoord3iv ( xglBuild3iv((GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glTexCoord3iv") ) + glTexCoord3iv ( v ) ; +} + +void xglTexCoord3s ( GLshort s, GLshort t, GLshort r ) +{ + if ( xglTraceIsEnabled("glTexCoord3s") ) + fprintf ( xglTraceFd, " glTexCoord3s ( (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , s, t, r ) ; + if ( xglExecuteIsEnabled("glTexCoord3s") ) + glTexCoord3s ( s, t, r ) ; +} + +void xglTexCoord3sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glTexCoord3sv") ) + fprintf ( xglTraceFd, " glTexCoord3sv ( xglBuild3sv((GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glTexCoord3sv") ) + glTexCoord3sv ( v ) ; +} + +void xglTexCoord4d ( GLdouble s, GLdouble t, GLdouble r, GLdouble q ) +{ + if ( xglTraceIsEnabled("glTexCoord4d") ) + fprintf ( xglTraceFd, " glTexCoord4d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , s, t, r, q ) ; + if ( xglExecuteIsEnabled("glTexCoord4d") ) + glTexCoord4d ( s, t, r, q ) ; +} + +void xglTexCoord4dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glTexCoord4dv") ) + fprintf ( xglTraceFd, " glTexCoord4dv ( xglBuild4dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glTexCoord4dv") ) + glTexCoord4dv ( v ) ; +} + +void xglTexCoord4f ( GLfloat s, GLfloat t, GLfloat r, GLfloat q ) +{ + if ( xglTraceIsEnabled("glTexCoord4f") ) + fprintf ( xglTraceFd, " glTexCoord4f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , s, t, r, q ) ; + if ( xglExecuteIsEnabled("glTexCoord4f") ) + glTexCoord4f ( s, t, r, q ) ; +} + +void xglTexCoord4fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glTexCoord4fv") ) + fprintf ( xglTraceFd, " glTexCoord4fv ( xglBuild4fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glTexCoord4fv") ) + glTexCoord4fv ( v ) ; +} + +void xglTexCoord4i ( GLint s, GLint t, GLint r, GLint q ) +{ + if ( xglTraceIsEnabled("glTexCoord4i") ) + fprintf ( xglTraceFd, " glTexCoord4i ( (GLint)%d, (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , s, t, r, q ) ; + if ( xglExecuteIsEnabled("glTexCoord4i") ) + glTexCoord4i ( s, t, r, q ) ; +} + +void xglTexCoord4iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glTexCoord4iv") ) + fprintf ( xglTraceFd, " glTexCoord4iv ( xglBuild4iv((GLint)%d,(GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glTexCoord4iv") ) + glTexCoord4iv ( v ) ; +} + +void xglTexCoord4s ( GLshort s, GLshort t, GLshort r, GLshort q ) +{ + if ( xglTraceIsEnabled("glTexCoord4s") ) + fprintf ( xglTraceFd, " glTexCoord4s ( (GLshort)%d, (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , s, t, r, q ) ; + if ( xglExecuteIsEnabled("glTexCoord4s") ) + glTexCoord4s ( s, t, r, q ) ; +} + +void xglTexCoord4sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glTexCoord4sv") ) + fprintf ( xglTraceFd, " glTexCoord4sv ( xglBuild4sv((GLshort)%d,(GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glTexCoord4sv") ) + glTexCoord4sv ( v ) ; +} + +void xglTexCoordPointerEXT ( GLint size, GLenum type, GLsizei stride, GLsizei count, void* ptr ) +{ + if ( xglTraceIsEnabled("glTexCoordPointerEXT") ) + fprintf ( xglTraceFd, " glTexCoordPointerEXT ( (GLint)%d, (GLenum)%s, (GLsizei)%d, (GLsizei)%d, (void *)0x%08x ) ;\n" , size, xglExpandGLenum ( (GLenum) type ), stride, count, ptr ) ; +#ifdef GL_VERSION_1_1 + glTexCoordPointer ( size, type, stride, ptr ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glTexCoordPointerEXT") ) + glTexCoordPointerEXT ( size, type, stride, count, ptr ) ; +#else + fprintf ( xglTraceFd, " glTexCoordPointerEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglTexEnvf ( GLenum target, GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glTexEnvf") ) + fprintf ( xglTraceFd, " glTexEnvf ( (GLenum)%s, (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glTexEnvf") ) + glTexEnvf ( target, pname, param ) ; +} + +void xglTexEnvfv ( GLenum target, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glTexEnvfv") ) + fprintf ( xglTraceFd, " glTexEnvfv ( (GLenum)%s, (GLenum)%s, xglBuild4fv(%ff,%ff,%ff,%ff) ) ;\n", + xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params[0], params[1], params[2], params[3] ) ; + if ( xglExecuteIsEnabled("glTexEnvfv") ) + glTexEnvfv ( target, pname, params ) ; +} + +void xglTexEnvi ( GLenum target, GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glTexEnvi") ) + fprintf ( xglTraceFd, " glTexEnvi ( (GLenum)%s, (GLenum)%s, (GLint)%s ) ;\n", + xglExpandGLenum ( (GLenum) target ), + xglExpandGLenum ( (GLenum) pname ), + xglExpandGLenum ( (GLenum) param ) ) ; + + if ( xglExecuteIsEnabled("glTexEnvi") ) + glTexEnvi ( target, pname, param ) ; +} + +void xglTexEnviv ( GLenum target, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glTexEnviv") ) + fprintf ( xglTraceFd, " glTexEnviv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glTexEnviv") ) + glTexEnviv ( target, pname, params ) ; +} + +void xglTexGend ( GLenum coord, GLenum pname, GLdouble param ) +{ + if ( xglTraceIsEnabled("glTexGend") ) + fprintf ( xglTraceFd, " glTexGend ( (GLenum)%s, (GLenum)%s, (GLdouble)%f ) ;\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glTexGend") ) + glTexGend ( coord, pname, param ) ; +} + +void xglTexGendv ( GLenum coord, GLenum pname, GLdouble* params ) +{ + if ( xglTraceIsEnabled("glTexGendv") ) + fprintf ( xglTraceFd, " glTexGendv ( (GLenum)%s, (GLenum)%s, (GLdouble *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glTexGendv") ) + glTexGendv ( coord, pname, params ) ; +} + +void xglTexGenf ( GLenum coord, GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glTexGenf") ) + fprintf ( xglTraceFd, " glTexGenf ( (GLenum)%s, (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glTexGenf") ) + glTexGenf ( coord, pname, param ) ; +} + +void xglTexGenfv ( GLenum coord, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glTexGenfv") ) + fprintf ( xglTraceFd, " glTexGenfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glTexGenfv") ) + glTexGenfv ( coord, pname, params ) ; +} + +void xglTexGeni ( GLenum coord, GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glTexGeni") ) + fprintf ( xglTraceFd, " glTexGeni ( (GLenum)%s, (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glTexGeni") ) + glTexGeni ( coord, pname, param ) ; +} + +void xglTexGeniv ( GLenum coord, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glTexGeniv") ) + fprintf ( xglTraceFd, " glTexGeniv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) coord ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glTexGeniv") ) + glTexGeniv ( coord, pname, params ) ; +} + +void xglTexImage1D ( GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels ) +{ + if ( xglTraceIsEnabled("glTexImage1D") ) + fprintf ( xglTraceFd, " glTexImage1D ( (GLenum)%s, (GLint)%d, (GLint)%d, (GLsizei)%d, (GLint)%d, (GLenum)%s, (GLenum)%s, (GLvoid *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), level, components, width, border, xglExpandGLenum ( (GLenum) format ), xglExpandGLenum ( (GLenum) type ), pixels ) ; + if ( xglExecuteIsEnabled("glTexImage1D") ) + glTexImage1D ( target, level, components, width, border, format, type, pixels ) ; +} + +void xglTexImage2D ( GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels ) +{ + if ( xglTraceIsEnabled("glTexImage2D") ) + fprintf ( xglTraceFd, " glTexImage2D ( (GLenum)%s, (GLint)%d, (GLint)%d, (GLsizei)%d, (GLsizei)%d, (GLint)%d, (GLenum)%s, (GLenum)%s, (GLvoid *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), level, components, width, height, border, xglExpandGLenum ( (GLenum) format ), xglExpandGLenum ( (GLenum) type ), pixels ) ; + if ( xglExecuteIsEnabled("glTexImage2D") ) + glTexImage2D ( target, level, components, width, height, border, format, type, pixels ) ; +} + +void xglTexParameterf ( GLenum target, GLenum pname, GLfloat param ) +{ + if ( xglTraceIsEnabled("glTexParameterf") ) + fprintf ( xglTraceFd, " glTexParameterf ( (GLenum)%s, (GLenum)%s, (GLfloat)%ff ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glTexParameterf") ) + glTexParameterf ( target, pname, param ) ; +} + +void xglTexParameterfv ( GLenum target, GLenum pname, GLfloat* params ) +{ + if ( xglTraceIsEnabled("glTexParameterfv") ) + fprintf ( xglTraceFd, " glTexParameterfv ( (GLenum)%s, (GLenum)%s, (GLfloat *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glTexParameterfv") ) + glTexParameterfv ( target, pname, params ) ; +} + +void xglTexParameteri ( GLenum target, GLenum pname, GLint param ) +{ + if ( xglTraceIsEnabled("glTexParameteri") ) + fprintf ( xglTraceFd, " glTexParameteri ( (GLenum)%s, (GLenum)%s, (GLint)%d ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), param ) ; + if ( xglExecuteIsEnabled("glTexParameteri") ) + glTexParameteri ( target, pname, param ) ; +} + +void xglTexParameteriv ( GLenum target, GLenum pname, GLint* params ) +{ + if ( xglTraceIsEnabled("glTexParameteriv") ) + fprintf ( xglTraceFd, " glTexParameteriv ( (GLenum)%s, (GLenum)%s, (GLint *)0x%08x ) ;\n" , xglExpandGLenum ( (GLenum) target ), xglExpandGLenum ( (GLenum) pname ), params ) ; + if ( xglExecuteIsEnabled("glTexParameteriv") ) + glTexParameteriv ( target, pname, params ) ; +} + +void xglTranslated ( GLdouble x, GLdouble y, GLdouble z ) +{ + if ( xglTraceIsEnabled("glTranslated") ) + fprintf ( xglTraceFd, " glTranslated ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glTranslated") ) + glTranslated ( x, y, z ) ; +} + +void xglTranslatef ( GLfloat x, GLfloat y, GLfloat z ) +{ + if ( xglTraceIsEnabled("glTranslatef") ) + fprintf ( xglTraceFd, " glTranslatef ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glTranslatef") ) + glTranslatef ( x, y, z ) ; +} + +void xglVertex2d ( GLdouble x, GLdouble y ) +{ + if ( xglTraceIsEnabled("glVertex2d") ) + fprintf ( xglTraceFd, " glVertex2d ( (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glVertex2d") ) + glVertex2d ( x, y ) ; +} + +void xglVertex2dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glVertex2dv") ) + fprintf ( xglTraceFd, " glVertex2dv ( xglBuild2dv((GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glVertex2dv") ) + glVertex2dv ( v ) ; +} + +void xglVertex2f ( GLfloat x, GLfloat y ) +{ + if ( xglTraceIsEnabled("glVertex2f") ) + fprintf ( xglTraceFd, " glVertex2f ( (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glVertex2f") ) + glVertex2f ( x, y ) ; +} + +void xglVertex2fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glVertex2fv") ) + fprintf ( xglTraceFd, " glVertex2fv ( xglBuild2fv((GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glVertex2fv") ) + glVertex2fv ( v ) ; +} + +void xglVertex2i ( GLint x, GLint y ) +{ + if ( xglTraceIsEnabled("glVertex2i") ) + fprintf ( xglTraceFd, " glVertex2i ( (GLint)%d, (GLint)%d ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glVertex2i") ) + glVertex2i ( x, y ) ; +} + +void xglVertex2iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glVertex2iv") ) + fprintf ( xglTraceFd, " glVertex2iv ( xglBuild2iv((GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glVertex2iv") ) + glVertex2iv ( v ) ; +} + +void xglVertex2s ( GLshort x, GLshort y ) +{ + if ( xglTraceIsEnabled("glVertex2s") ) + fprintf ( xglTraceFd, " glVertex2s ( (GLshort)%d, (GLshort)%d ) ;\n" , x, y ) ; + if ( xglExecuteIsEnabled("glVertex2s") ) + glVertex2s ( x, y ) ; +} + +void xglVertex2sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glVertex2sv") ) + fprintf ( xglTraceFd, " glVertex2sv ( xglBuild2sv((GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1] ) ; + if ( xglExecuteIsEnabled("glVertex2sv") ) + glVertex2sv ( v ) ; +} + +void xglVertex3d ( GLdouble x, GLdouble y, GLdouble z ) +{ + if ( xglTraceIsEnabled("glVertex3d") ) + fprintf ( xglTraceFd, " glVertex3d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glVertex3d") ) + glVertex3d ( x, y, z ) ; +} + +void xglVertex3dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glVertex3dv") ) + fprintf ( xglTraceFd, " glVertex3dv ( xglBuild3dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glVertex3dv") ) + glVertex3dv ( v ) ; +} + +void xglVertex3f ( GLfloat x, GLfloat y, GLfloat z ) +{ + if ( xglTraceIsEnabled("glVertex3f") ) + fprintf ( xglTraceFd, " glVertex3f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glVertex3f") ) + glVertex3f ( x, y, z ) ; +} + +void xglVertex3fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glVertex3fv") ) + fprintf ( xglTraceFd, " glVertex3fv ( xglBuild3fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glVertex3fv") ) + glVertex3fv ( v ) ; +} + +void xglVertex3i ( GLint x, GLint y, GLint z ) +{ + if ( xglTraceIsEnabled("glVertex3i") ) + fprintf ( xglTraceFd, " glVertex3i ( (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glVertex3i") ) + glVertex3i ( x, y, z ) ; +} + +void xglVertex3iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glVertex3iv") ) + fprintf ( xglTraceFd, " glVertex3iv ( xglBuild3iv((GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glVertex3iv") ) + glVertex3iv ( v ) ; +} + +void xglVertex3s ( GLshort x, GLshort y, GLshort z ) +{ + if ( xglTraceIsEnabled("glVertex3s") ) + fprintf ( xglTraceFd, " glVertex3s ( (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , x, y, z ) ; + if ( xglExecuteIsEnabled("glVertex3s") ) + glVertex3s ( x, y, z ) ; +} + +void xglVertex3sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glVertex3sv") ) + fprintf ( xglTraceFd, " glVertex3sv ( xglBuild3sv((GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2] ) ; + if ( xglExecuteIsEnabled("glVertex3sv") ) + glVertex3sv ( v ) ; +} + +void xglVertex4d ( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) +{ + if ( xglTraceIsEnabled("glVertex4d") ) + fprintf ( xglTraceFd, " glVertex4d ( (GLdouble)%f, (GLdouble)%f, (GLdouble)%f, (GLdouble)%f ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glVertex4d") ) + glVertex4d ( x, y, z, w ) ; +} + +void xglVertex4dv ( GLdouble* v ) +{ + if ( xglTraceIsEnabled("glVertex4dv") ) + fprintf ( xglTraceFd, " glVertex4dv ( xglBuild4dv((GLdouble)%f,(GLdouble)%f,(GLdouble)%f,(GLdouble)%f) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glVertex4dv") ) + glVertex4dv ( v ) ; +} + +void xglVertex4f ( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +{ + if ( xglTraceIsEnabled("glVertex4f") ) + fprintf ( xglTraceFd, " glVertex4f ( (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff, (GLfloat)%ff ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glVertex4f") ) + glVertex4f ( x, y, z, w ) ; +} + +void xglVertex4fv ( GLfloat* v ) +{ + if ( xglTraceIsEnabled("glVertex4fv") ) + fprintf ( xglTraceFd, " glVertex4fv ( xglBuild4fv((GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff,(GLfloat)%ff) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glVertex4fv") ) + glVertex4fv ( v ) ; +} + +void xglVertex4i ( GLint x, GLint y, GLint z, GLint w ) +{ + if ( xglTraceIsEnabled("glVertex4i") ) + fprintf ( xglTraceFd, " glVertex4i ( (GLint)%d, (GLint)%d, (GLint)%d, (GLint)%d ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glVertex4i") ) + glVertex4i ( x, y, z, w ) ; +} + +void xglVertex4iv ( GLint* v ) +{ + if ( xglTraceIsEnabled("glVertex4iv") ) + fprintf ( xglTraceFd, " glVertex4iv ( xglBuild4iv((GLint)%d,(GLint)%d,(GLint)%d,(GLint)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glVertex4iv") ) + glVertex4iv ( v ) ; +} + +void xglVertex4s ( GLshort x, GLshort y, GLshort z, GLshort w ) +{ + if ( xglTraceIsEnabled("glVertex4s") ) + fprintf ( xglTraceFd, " glVertex4s ( (GLshort)%d, (GLshort)%d, (GLshort)%d, (GLshort)%d ) ;\n" , x, y, z, w ) ; + if ( xglExecuteIsEnabled("glVertex4s") ) + glVertex4s ( x, y, z, w ) ; +} + +void xglVertex4sv ( GLshort* v ) +{ + if ( xglTraceIsEnabled("glVertex4sv") ) + fprintf ( xglTraceFd, " glVertex4sv ( xglBuild4sv((GLshort)%d,(GLshort)%d,(GLshort)%d,(GLshort)%d) ) ;\n" , v[0], v[1], v[2], v[3] ) ; + if ( xglExecuteIsEnabled("glVertex4sv") ) + glVertex4sv ( v ) ; +} + +void xglVertexPointerEXT ( GLint size, GLenum type, GLsizei stride, GLsizei count, void* ptr ) +{ + if ( xglTraceIsEnabled("glVertexPointerEXT") ) + fprintf ( xglTraceFd, " glVertexPointerEXT ( (GLint)%d, (GLenum)%s, (GLsizei)%d, (GLsizei)%d, (void *)0x%08x ) ;\n" , size, xglExpandGLenum ( (GLenum) type ), stride, count, ptr ) ; +#ifdef GL_VERSION_1_1 + glVertexPointer ( size, type, stride, ptr ) ; +#else +#ifdef GL_EXT_vertex_array + if ( xglExecuteIsEnabled("glVertexPointerEXT") ) + glVertexPointerEXT ( size, type, stride, count, ptr ) ; +#else + fprintf ( xglTraceFd, " glVertexPointerEXT isn't supported on this OpenGL!\n" ) ; +#endif +#endif +} + +void xglViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) +{ + if ( xglTraceIsEnabled("glViewport") ) + fprintf ( xglTraceFd, " glViewport ( (GLint)%d, (GLint)%d, (GLsizei)%d, (GLsizei)%d ) ;\n" , x, y, width, height ) ; + if ( xglExecuteIsEnabled("glViewport") ) + glViewport ( x, y, width, height ) ; +} + +void xglutAddMenuEntry ( char* label, int value ) +{ + if ( xglTraceIsEnabled("glutAddMenuEntry") ) + fprintf ( xglTraceFd, " /* glutAddMenuEntry ( \"%s\", %d ) ; */\n" , label, value ) ; + if ( xglExecuteIsEnabled("glutAddMenuEntry") ) + glutAddMenuEntry ( label, value ) ; +} + +void xglutAttachMenu ( int button ) +{ + if ( xglTraceIsEnabled("glutAttachMenu") ) + fprintf ( xglTraceFd, " /* glutAttachMenu ( %d ) ; */\n" , button ) ; + if ( xglExecuteIsEnabled("glutAttachMenu") ) + glutAttachMenu ( button ) ; +} + +int xglutCreateMenu ( void (*func)(int) ) +{ + if ( xglTraceIsEnabled("glutCreateMenu") ) + fprintf ( xglTraceFd, " /* glutCreateMenu ( 0x%08x ) ; */\n" , func ) ; + + return glutCreateMenu ( func ) ; +} + +int xglutCreateWindow ( char* title ) +{ + if ( xglTraceIsEnabled("glutCreateWindow") ) + fprintf ( xglTraceFd, " /* glutCreateWindow ( \"%s\" ) ; */\n" , title ) ; + + return glutCreateWindow ( title ) ; +} + +void xglutDisplayFunc ( void (*func)(void) ) +{ + if ( xglTraceIsEnabled("glutDisplayFunc") ) + fprintf ( xglTraceFd, " /* glutDisplayFunc ( 0x%08x ) ; */\n" , func ) ; + if ( xglExecuteIsEnabled("glutDisplayFunc") ) + glutDisplayFunc ( func ) ; +} + +void xglutIdleFunc ( void (*func)(void) ) +{ + if ( xglTraceIsEnabled("glutIdleFunc") ) + fprintf ( xglTraceFd, " /* glutIdleFunc ( 0x%08x ) ; */\n" , func ) ; + if ( xglExecuteIsEnabled("glutIdleFunc") ) + glutIdleFunc ( func ) ; +} + +void xglutInit ( int* argcp, char** argv ) +{ + if ( xglTraceIsEnabled("glutInit") ) + fprintf ( xglTraceFd, " /* glutInit ( (int *)0x%08x, (char **)0x%08x ) ; */\n" , argcp, argv ) ; + if ( xglExecuteIsEnabled("glutInit") ) + glutInit ( argcp, argv ) ; +} + +void xglutInitDisplayMode ( unsigned int mode ) +{ + if ( xglTraceIsEnabled("glutInitDisplayMode") ) + fprintf ( xglTraceFd, " /* glutInitDisplayMode ( %u ) ; */\n" , mode ) ; + if ( xglExecuteIsEnabled("glutInitDisplayMode") ) + glutInitDisplayMode ( mode ) ; +} + +void xglutInitWindowPosition ( int x, int y ) +{ + if ( xglTraceIsEnabled("glutInitWindowPosition") ) + fprintf ( xglTraceFd, " /* glutInitWindowPosition ( %d, %d ) ; */\n" , x, y ) ; + if ( xglExecuteIsEnabled("glutInitWindowPosition") ) + glutInitWindowPosition ( x, y ) ; +} + +void xglutInitWindowSize ( int width, int height ) +{ + if ( xglTraceIsEnabled("glutInitWindowSize") ) + fprintf ( xglTraceFd, " /* glutInitWindowSize ( %d, %d ) ; */\n" , width, height ) ; + if ( xglExecuteIsEnabled("glutInitWindowSize") ) + glutInitWindowSize ( width, height ) ; +} + +void xglutKeyboardFunc ( void (*func)(unsigned char key, int x, int y) ) +{ + if ( xglTraceIsEnabled("glutKeyboardFunc") ) + fprintf ( xglTraceFd, " /* glutKeyboardFunc ( 0x%08x ) ; */\n" , func ) ; + if ( xglExecuteIsEnabled("glutKeyboardFunc") ) + glutKeyboardFunc ( func ) ; +} + +void xglutMainLoopUpdate ( ) +{ + if ( xglTraceIsEnabled("glutMainLoopUpdate") ) + fprintf ( xglTraceFd, " /* glutMainLoopUpdate ( ) ; */\n" ) ; + if ( xglExecuteIsEnabled("glutMainLoopUpdate") ) + /* glutMainLoopUpdate ( ) ; */ + printf("Steves glutMainLoopUpdate() hack not executed!!!!\n"); +} + +void xglutPostRedisplay ( ) +{ + if ( xglTraceIsEnabled("glutPostRedisplay") ) + fprintf ( xglTraceFd, " /* glutPostRedisplay ( ) ; */\n" ) ; + if ( xglExecuteIsEnabled("glutPostRedisplay") ) + glutPostRedisplay ( ) ; +} + +void xglutPreMainLoop ( ) +{ + if ( xglTraceIsEnabled("glutPreMainLoop") ) + fprintf ( xglTraceFd, " /* glutPreMainLoop ( ) ; */\n" ) ; + if ( xglExecuteIsEnabled("glutPreMainLoop") ) + /* glutPreMainLoop ( ) ; */ + printf("Steves glutPreLoopUpdate() hack not executed!!!!\n"); + +} + +void xglutReshapeFunc ( void (*func)(int width, int height) ) +{ + if ( xglTraceIsEnabled("glutReshapeFunc") ) + fprintf ( xglTraceFd, " /* glutReshapeFunc ( 0x%08x ) ; */\n" , func ) ; + if ( xglExecuteIsEnabled("glutReshapeFunc") ) + glutReshapeFunc ( func ) ; +} + +void xglutSwapBuffers () +{ + if ( xglTraceIsEnabled("glutSwapBuffers") ) + fprintf ( xglTraceFd, " /* glutSwapBuffers ( ) ; */\n" ) ; + if ( xglExecuteIsEnabled("glutSwapBuffers") ) + glutSwapBuffers () ; +} + +GLboolean xglAreTexturesResidentEXT ( GLsizei n, GLuint* textures, GLboolean* residences ) +{ + if ( xglTraceIsEnabled("glAreTexturesResidentEXT") ) + fprintf ( xglTraceFd, " /* glAreTexturesResidentEXT ( (GLsizei)%d, (GLuint *)0x%08x, (GLboolean *)0x%08x ) ; */\n" , n, textures, residences ) ; + +#ifdef GL_TEXTURE_2D_BINDING_EXT + if ( xglExecuteIsEnabled("glAreTexturesResidentEXT") ) + return glAreTexturesResidentEXT ( n, textures, residences ) ; +#else + fprintf ( xglTraceFd, " glAreTexturesResidentEXT isn't supported on this OpenGL!\n" ) ; +#endif + + return TRUE ; +} + +GLboolean xglIsTextureEXT ( GLuint texture ) +{ + if ( xglTraceIsEnabled("glIsTextureEXT") ) + fprintf ( xglTraceFd, " /* glIsTextureEXT ( (GLuint)%u ) ; */\n" , texture ) ; + +#ifdef GL_TEXTURE_2D_BINDING_EXT + if ( xglExecuteIsEnabled("glIsTextureEXT") ) + return glIsTextureEXT ( texture ) ; +#else + fprintf ( xglTraceFd, " glIsTextureEXT isn't supported on this OpenGL!\n" ) ; +#endif + + return TRUE ; +} + +void xglBindTextureEXT ( GLenum target, GLuint texture ) +{ + if ( xglTraceIsEnabled("glBindTextureEXT") ) + fprintf ( xglTraceFd, " glBindTextureEXT ( (GLenum)%s, (GLuint)%u ) ;\n" , xglExpandGLenum ( (GLenum) target ), texture ) ; + +#ifdef GL_TEXTURE_2D_BINDING_EXT + if ( xglExecuteIsEnabled("glBindTextureEXT") ) + glBindTextureEXT ( target, texture ) ; +#else + fprintf ( xglTraceFd, " glBindTextureEXT isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglDeleteTexturesEXT ( GLsizei n, GLuint* textures ) +{ + if ( xglTraceIsEnabled("glDeleteTexturesEXT") ) + fprintf ( xglTraceFd, " glDeleteTexturesEXT ( (GLsizei)%d, (GLuint *)0x%08x ) ;\n" , n, textures ) ; + +#ifdef GL_TEXTURE_2D_BINDING_EXT + if ( xglExecuteIsEnabled("glDeleteTexturesEXT") ) + glDeleteTexturesEXT ( n, textures ) ; +#else + fprintf ( xglTraceFd, " glDeleteTextures isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglGenTexturesEXT ( GLsizei n, GLuint* textures ) +{ + if ( xglTraceIsEnabled("glGenTexturesEXT") ) + fprintf ( xglTraceFd, " glGenTexturesEXT ( (GLsizei)%d, (GLuint *)0x%08x ) ;\n" , n, textures ) ; + +#ifdef GL_TEXTURE_2D_BINDING_EXT + if ( xglExecuteIsEnabled("glGenTexturesEXT") ) + glGenTexturesEXT ( n, textures ) ; +#else + fprintf ( xglTraceFd, " glDeleteTexturesEXT isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglPrioritizeTexturesEXT ( GLsizei n, GLuint* textures, GLclampf* priorities ) +{ + if ( xglTraceIsEnabled("glPrioritizeTexturesEXT") ) + fprintf ( xglTraceFd, " glPrioritizeTexturesEXT ( (GLsizei)%d, (GLuint *)0x%08x, (GLclampf *)0x%08x ) ;\n" , n, textures, priorities ) ; + +#ifdef GL_TEXTURE_2D_BINDING_EXT + if ( xglExecuteIsEnabled("glPrioritizeTexturesEXT") ) + glPrioritizeTexturesEXT ( n, textures, priorities ) ; +#else + fprintf ( xglTraceFd, " glPrioritizeTexturesEXT isn't supported on this OpenGL!\n" ) ; +#endif +} + + +GLboolean xglAreTexturesResident ( GLsizei n, GLuint* textures, GLboolean* residences ) +{ + if ( xglTraceIsEnabled("glAreTexturesResident") ) + fprintf ( xglTraceFd, " /* glAreTexturesResident ( (GLsizei)%d, (GLuint *)0x%08x, (GLboolean *)0x%08x ) ; */\n" , n, textures, residences ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glAreTexturesResident") ) + return glAreTexturesResident ( n, textures, residences ) ; +#else + fprintf ( xglTraceFd, " glAreTexturesResident isn't supported on this OpenGL!\n" ) ; +#endif + + return TRUE ; +} + +GLboolean xglIsTexture ( GLuint texture ) +{ + if ( xglTraceIsEnabled("glIsTexture") ) + fprintf ( xglTraceFd, " /* glIsTexture ( (GLuint)%u ) ; */\n" , texture ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glIsTexture") ) + return glIsTexture ( texture ) ; +#else + fprintf ( xglTraceFd, " glIsTexture isn't supported on this OpenGL!\n" ) ; +#endif + + return TRUE ; +} + +void xglBindTexture ( GLenum target, GLuint texture ) +{ + if ( xglTraceIsEnabled("glBindTexture") ) + fprintf ( xglTraceFd, " glBindTexture ( (GLenum)%s, (GLuint)%u ) ;\n" , xglExpandGLenum ( (GLenum) target ), texture ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glBindTexture") ) + glBindTexture ( target, texture ) ; +#else + fprintf ( xglTraceFd, " glBindTexture isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglDeleteTextures ( GLsizei n, GLuint* textures ) +{ + if ( xglTraceIsEnabled("glDeleteTextures") ) + fprintf ( xglTraceFd, " glDeleteTextures ( (GLsizei)%d, (GLuint *)0x%08x ) ;\n" , n, textures ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glDeleteTextures") ) + glDeleteTextures ( n, textures ) ; +#else + fprintf ( xglTraceFd, " glDeleteTextures isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglGenTextures ( GLsizei n, GLuint* textures ) +{ + if ( xglTraceIsEnabled("glGenTextures") ) + fprintf ( xglTraceFd, " glGenTextures ( (GLsizei)%d, (GLuint *)0x%08x ) ;\n" , n, textures ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glGenTextures") ) + glGenTextures ( n, textures ) ; +#else + fprintf ( xglTraceFd, " glDeleteTextures isn't supported on this OpenGL!\n" ) ; +#endif +} + +void xglPrioritizeTextures ( GLsizei n, GLuint* textures, GLclampf* priorities ) +{ + if ( xglTraceIsEnabled("glPrioritizeTextures") ) + fprintf ( xglTraceFd, " glPrioritizeTextures ( (GLsizei)%d, (GLuint *)0x%08x, (GLclampf *)0x%08x ) ;\n" , n, textures, priorities ) ; + +#ifdef GL_VERSION_1_1 + if ( xglExecuteIsEnabled("glPrioritizeTextures") ) + glPrioritizeTextures ( n, textures, priorities ) ; +#else + fprintf ( xglTraceFd, " glPrioritizeTextures isn't supported on this OpenGL!\n" ) ; +#endif +} + +#endif + diff --git a/XGL/xgl.h b/XGL/xgl.h new file mode 100644 index 000000000..e1b11e560 --- /dev/null +++ b/XGL/xgl.h @@ -0,0 +1,825 @@ + +#include +#include +#include + +/* xgl Utilities */ + +extern FILE *xglTraceFd ; + +int xglTraceIsEnabled ( char *gl_function_name ) ; +int xglExecuteIsEnabled ( char *gl_function_name ) ; +char *xglExpandGLenum ( GLenum x ) ; + +GLdouble *xglBuild1dv ( GLdouble v ) ; +GLfloat *xglBuild1fv ( GLfloat v ) ; +GLbyte *xglBuild1bv ( GLbyte v ) ; +GLint *xglBuild1iv ( GLint v ) ; +GLshort *xglBuild1sv ( GLshort v ) ; +GLubyte *xglBuild1ubv ( GLubyte v ) ; +GLuint *xglBuild1uiv ( GLuint v ) ; +GLushort *xglBuild1usv ( GLushort v ) ; + +GLdouble *xglBuild2dv ( GLdouble v0, GLdouble v1 ) ; +GLfloat *xglBuild2fv ( GLfloat v0, GLfloat v1 ) ; +GLbyte *xglBuild2bv ( GLbyte v0, GLbyte v1 ) ; +GLint *xglBuild2iv ( GLint v0, GLint v1 ) ; +GLshort *xglBuild2sv ( GLshort v0, GLshort v1 ) ; +GLubyte *xglBuild2ubv ( GLubyte v0, GLubyte v1 ) ; +GLuint *xglBuild2uiv ( GLuint v0, GLuint v1 ) ; +GLushort *xglBuild2usv ( GLushort v0, GLushort v1 ) ; + +GLdouble *xglBuild3dv ( GLdouble v0, GLdouble v1, GLdouble v2 ) ; +GLfloat *xglBuild3fv ( GLfloat v0, GLfloat v1, GLfloat v2 ) ; +GLbyte *xglBuild3bv ( GLbyte v0, GLbyte v1, GLbyte v2 ) ; +GLint *xglBuild3iv ( GLint v0, GLint v1, GLint v2 ) ; +GLshort *xglBuild3sv ( GLshort v0, GLshort v1, GLshort v2 ) ; +GLubyte *xglBuild3ubv ( GLubyte v0, GLubyte v1, GLubyte v2 ) ; +GLuint *xglBuild3uiv ( GLuint v0, GLuint v1, GLuint v2 ) ; +GLushort *xglBuild3usv ( GLushort v0, GLushort v1, GLushort v2 ) ; + +GLdouble *xglBuild4dv ( GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3 ) ; +GLfloat *xglBuild4fv ( GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) ; +GLbyte *xglBuild4bv ( GLbyte v0, GLbyte v1, GLbyte v2, GLbyte v3 ) ; +GLint *xglBuild4iv ( GLint v0, GLint v1, GLint v2, GLint v3 ) ; +GLshort *xglBuild4sv ( GLshort v0, GLshort v1, GLshort v2, GLshort v3 ) ; +GLubyte *xglBuild4ubv ( GLubyte v0, GLubyte v1, GLubyte v2, GLubyte v3 ) ; +GLuint *xglBuild4uiv ( GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) ; +GLushort *xglBuild4usv ( GLushort v0, GLushort v1, GLushort v2, GLushort v3 ) ; + +GLfloat *xglBuildMatrixf ( GLfloat m0 , GLfloat m1 , GLfloat m2 , GLfloat m3 , + GLfloat m4 , GLfloat m5 , GLfloat m6 , GLfloat m7 , + GLfloat m8 , GLfloat m9 , GLfloat m10, GLfloat m11, + GLfloat m12, GLfloat m13, GLfloat m14, GLfloat m15 ) ; + +GLdouble *xglBuildMatrixd ( GLdouble m0 , GLdouble m1 , GLdouble m2 , GLdouble m3 , + GLdouble m4 , GLdouble m5 , GLdouble m6 , GLdouble m7 , + GLdouble m8 , GLdouble m9 , GLdouble m10, GLdouble m11, + GLdouble m12, GLdouble m13, GLdouble m14, GLdouble m15 ) ; + +/* + Conditionally compile all 'xgl' calls into standard 'gl' calls... + + OR + + Declare all possible 'xgl' calls as 'extern'. +*/ + +#ifndef XGL_TRACE + +#define xglAccum glAccum +#define xglAlphaFunc glAlphaFunc +#ifdef GL_EXT_vertex_array +#define xglArrayElementEXT glArrayElementEXT +#endif +#define xglBegin glBegin +#define xglBitmap glBitmap +#ifdef GL_EXT_blend_color +#define xglBlendColorEXT glBlendColorEXT +#endif +#ifdef GL_EXT_blend_minmax +#define xglBlendEquationEXT glBlendEquationEXT +#endif +#define xglBlendFunc glBlendFunc +#define xglCallList glCallList +#define xglCallLists glCallLists +#define xglClear glClear +#define xglClearAccum glClearAccum +#define xglClearColor glClearColor +#define xglClearDepth glClearDepth +#define xglClearIndex glClearIndex +#define xglClearStencil glClearStencil +#define xglClipPlane glClipPlane +#define xglColor3b glColor3b +#define xglColor3bv glColor3bv +#define xglColor3d glColor3d +#define xglColor3dv glColor3dv +#define xglColor3f glColor3f +#define xglColor3fv glColor3fv +#define xglColor3i glColor3i +#define xglColor3iv glColor3iv +#define xglColor3s glColor3s +#define xglColor3sv glColor3sv +#define xglColor3ub glColor3ub +#define xglColor3ubv glColor3ubv +#define xglColor3ui glColor3ui +#define xglColor3uiv glColor3uiv +#define xglColor3us glColor3us +#define xglColor3usv glColor3usv +#define xglColor4b glColor4b +#define xglColor4bv glColor4bv +#define xglColor4d glColor4d +#define xglColor4dv glColor4dv +#define xglColor4f glColor4f +#define xglColor4fv glColor4fv +#define xglColor4i glColor4i +#define xglColor4iv glColor4iv +#define xglColor4s glColor4s +#define xglColor4sv glColor4sv +#define xglColor4ub glColor4ub +#define xglColor4ubv glColor4ubv +#define xglColor4ui glColor4ui +#define xglColor4uiv glColor4uiv +#define xglColor4us glColor4us +#define xglColor4usv glColor4usv +#define xglColorMask glColorMask +#define xglColorMaterial glColorMaterial +#ifdef GL_EXT_vertex_array +#define xglColorPointerEXT glColorPointerEXT +#endif +#define xglCopyPixels glCopyPixels +#define xglCullFace glCullFace +#define xglDeleteLists glDeleteLists +#define xglDepthFunc glDepthFunc +#define xglDepthMask glDepthMask +#define xglDepthRange glDepthRange +#define xglDisable glDisable +#ifdef GL_EXT_vertex_array +#define xglDrawArraysEXT glDrawArraysEXT +#endif +#define xglDrawBuffer glDrawBuffer +#define xglDrawPixels glDrawPixels +#define xglEdgeFlag glEdgeFlag +#ifdef GL_EXT_vertex_array +#define xglEdgeFlagPointerEXT glEdgeFlagPointerEXT +#endif +#define xglEdgeFlagv glEdgeFlagv +#define xglEnable glEnable +#define xglEnd glEnd +#define xglEndList glEndList +#define xglEvalCoord1d glEvalCoord1d +#define xglEvalCoord1dv glEvalCoord1dv +#define xglEvalCoord1f glEvalCoord1f +#define xglEvalCoord1fv glEvalCoord1fv +#define xglEvalCoord2d glEvalCoord2d +#define xglEvalCoord2dv glEvalCoord2dv +#define xglEvalCoord2f glEvalCoord2f +#define xglEvalCoord2fv glEvalCoord2fv +#define xglEvalMesh1 glEvalMesh1 +#define xglEvalMesh2 glEvalMesh2 +#define xglEvalPoint1 glEvalPoint1 +#define xglEvalPoint2 glEvalPoint2 +#define xglFeedbackBuffer glFeedbackBuffer +#define xglFinish glFinish +#define xglFlush glFlush +#define xglFogf glFogf +#define xglFogfv glFogfv +#define xglFogi glFogi +#define xglFogiv glFogiv +#define xglFrontFace glFrontFace +#define xglFrustum glFrustum +#define xglGenLists glGenLists +#define xglGetBooleanv glGetBooleanv +#define xglGetClipPlane glGetClipPlane +#define xglGetDoublev glGetDoublev +#define xglGetError glGetError +#define xglGetFloatv glGetFloatv +#define xglGetIntegerv glGetIntegerv +#define xglGetLightfv glGetLightfv +#define xglGetLightiv glGetLightiv +#define xglGetMapdv glGetMapdv +#define xglGetMapfv glGetMapfv +#define xglGetMapiv glGetMapiv +#define xglGetMaterialfv glGetMaterialfv +#define xglGetMaterialiv glGetMaterialiv +#define xglGetPixelMapfv glGetPixelMapfv +#define xglGetPixelMapuiv glGetPixelMapuiv +#define xglGetPixelMapusv glGetPixelMapusv +#ifdef GL_EXT_vertex_array +#define xglGetPointervEXT glGetPointervEXT +#endif +#define xglGetPolygonStipple glGetPolygonStipple +#define xglGetString glGetString +#define xglGetTexEnvfv glGetTexEnvfv +#define xglGetTexEnviv glGetTexEnviv +#define xglGetTexGendv glGetTexGendv +#define xglGetTexGenfv glGetTexGenfv +#define xglGetTexGeniv glGetTexGeniv +#define xglGetTexImage glGetTexImage +#define xglGetTexLevelParameterfv glGetTexLevelParameterfv +#define xglGetTexLevelParameteriv glGetTexLevelParameteriv +#define xglGetTexParameterfv glGetTexParameterfv +#define xglGetTexParameteriv glGetTexParameteriv +#define xglHint glHint +#define xglIndexMask glIndexMask +#ifdef GL_EXT_vertex_array +#define xglIndexPointerEXT glIndexPointerEXT +#endif +#define xglIndexd glIndexd +#define xglIndexdv glIndexdv +#define xglIndexf glIndexf +#define xglIndexfv glIndexfv +#define xglIndexi glIndexi +#define xglIndexiv glIndexiv +#define xglIndexs glIndexs +#define xglIndexsv glIndexsv +#define xglInitNames glInitNames +#define xglIsEnabled glIsEnabled +#define xglIsList glIsList +#define xglLightModelf glLightModelf +#define xglLightModelfv glLightModelfv +#define xglLightModeli glLightModeli +#define xglLightModeliv glLightModeliv +#define xglLightf glLightf +#define xglLightfv glLightfv +#define xglLighti glLighti +#define xglLightiv glLightiv +#define xglLineStipple glLineStipple +#define xglLineWidth glLineWidth +#define xglListBase glListBase +#define xglLoadIdentity glLoadIdentity +#define xglLoadMatrixd glLoadMatrixd +#define xglLoadMatrixf glLoadMatrixf +#define xglLoadName glLoadName +#define xglLogicOp glLogicOp +#define xglMap1d glMap1d +#define xglMap1f glMap1f +#define xglMap2d glMap2d +#define xglMap2f glMap2f +#define xglMapGrid1d glMapGrid1d +#define xglMapGrid1f glMapGrid1f +#define xglMapGrid2d glMapGrid2d +#define xglMapGrid2f glMapGrid2f +#define xglMaterialf glMaterialf +#define xglMaterialfv glMaterialfv +#define xglMateriali glMateriali +#define xglMaterialiv glMaterialiv +#define xglMatrixMode glMatrixMode +#define xglMultMatrixd glMultMatrixd +#define xglMultMatrixf glMultMatrixf +#define xglNewList glNewList +#define xglNormal3b glNormal3b +#define xglNormal3bv glNormal3bv +#define xglNormal3d glNormal3d +#define xglNormal3dv glNormal3dv +#define xglNormal3f glNormal3f +#ifdef DEBUGGING_NORMALS +#define xglNormal3fv(f) {\ +float ff = (f)[0]*(f)[0]+(f)[1]*(f)[1]+(f)[2]*(f)[2];\ +if ( ff < 0.9 || ff > 1.1 )\ +{\ +fprintf(stderr,"glNormal3fv Overflow: %f, %f, %f -> %f [%s,%s,%s]\n",\ +(f)[0],(f)[1],(f)[2],ff,str1,str2,str3);\ +normal_bombed = 1 ;\ +}\ +glNormal3fv(f);\ +} +#else +#define xglNormal3fv glNormal3fv +#endif +#define xglNormal3i glNormal3i +#define xglNormal3iv glNormal3iv +#define xglNormal3s glNormal3s +#define xglNormal3sv glNormal3sv +#ifdef GL_EXT_vertex_array +#define xglNormalPointerEXT glNormalPointerEXT +#endif +#define xglOrtho glOrtho +#define xglPassThrough glPassThrough +#define xglPixelMapfv glPixelMapfv +#define xglPixelMapuiv glPixelMapuiv +#define xglPixelMapusv glPixelMapusv +#define xglPixelStoref glPixelStoref +#define xglPixelStorei glPixelStorei +#define xglPixelTransferf glPixelTransferf +#define xglPixelTransferi glPixelTransferi +#define xglPixelZoom glPixelZoom +#define xglPointSize glPointSize +#define xglPolygonMode glPolygonMode +#ifdef GL_EXT_polygon_offset +#define xglPolygonOffsetEXT glPolygonOffsetEXT +#endif +#define xglPolygonOffset glPolygonOffset +#define xglPolygonStipple glPolygonStipple +#define xglPopAttrib glPopAttrib +#define xglPopMatrix glPopMatrix +#define xglPopName glPopName +#define xglPushAttrib glPushAttrib +#define xglPushMatrix glPushMatrix +#define xglPushName glPushName +#define xglRasterPos2d glRasterPos2d +#define xglRasterPos2dv glRasterPos2dv +#define xglRasterPos2f glRasterPos2f +#define xglRasterPos2fv glRasterPos2fv +#define xglRasterPos2i glRasterPos2i +#define xglRasterPos2iv glRasterPos2iv +#define xglRasterPos2s glRasterPos2s +#define xglRasterPos2sv glRasterPos2sv +#define xglRasterPos3d glRasterPos3d +#define xglRasterPos3dv glRasterPos3dv +#define xglRasterPos3f glRasterPos3f +#define xglRasterPos3fv glRasterPos3fv +#define xglRasterPos3i glRasterPos3i +#define xglRasterPos3iv glRasterPos3iv +#define xglRasterPos3s glRasterPos3s +#define xglRasterPos3sv glRasterPos3sv +#define xglRasterPos4d glRasterPos4d +#define xglRasterPos4dv glRasterPos4dv +#define xglRasterPos4f glRasterPos4f +#define xglRasterPos4fv glRasterPos4fv +#define xglRasterPos4i glRasterPos4i +#define xglRasterPos4iv glRasterPos4iv +#define xglRasterPos4s glRasterPos4s +#define xglRasterPos4sv glRasterPos4sv +#define xglReadBuffer glReadBuffer +#define xglReadPixels glReadPixels +#define xglRectd glRectd +#define xglRectdv glRectdv +#define xglRectf glRectf +#define xglRectfv glRectfv +#define xglRecti glRecti +#define xglRectiv glRectiv +#define xglRects glRects +#define xglRectsv glRectsv +#define xglRenderMode glRenderMode +#define xglRotated glRotated +#define xglRotatef glRotatef +#define xglScaled glScaled +#define xglScalef glScalef +#define xglScissor glScissor +#define xglSelectBuffer glSelectBuffer +#define xglShadeModel glShadeModel +#define xglStencilFunc glStencilFunc +#define xglStencilMask glStencilMask +#define xglStencilOp glStencilOp +#define xglTexCoord1d glTexCoord1d +#define xglTexCoord1dv glTexCoord1dv +#define xglTexCoord1f glTexCoord1f +#define xglTexCoord1fv glTexCoord1fv +#define xglTexCoord1i glTexCoord1i +#define xglTexCoord1iv glTexCoord1iv +#define xglTexCoord1s glTexCoord1s +#define xglTexCoord1sv glTexCoord1sv +#define xglTexCoord2d glTexCoord2d +#define xglTexCoord2dv glTexCoord2dv +#define xglTexCoord2f glTexCoord2f +#define xglTexCoord2fv glTexCoord2fv +#define xglTexCoord2i glTexCoord2i +#define xglTexCoord2iv glTexCoord2iv +#define xglTexCoord2s glTexCoord2s +#define xglTexCoord2sv glTexCoord2sv +#define xglTexCoord3d glTexCoord3d +#define xglTexCoord3dv glTexCoord3dv +#define xglTexCoord3f glTexCoord3f +#define xglTexCoord3fv glTexCoord3fv +#define xglTexCoord3i glTexCoord3i +#define xglTexCoord3iv glTexCoord3iv +#define xglTexCoord3s glTexCoord3s +#define xglTexCoord3sv glTexCoord3sv +#define xglTexCoord4d glTexCoord4d +#define xglTexCoord4dv glTexCoord4dv +#define xglTexCoord4f glTexCoord4f +#define xglTexCoord4fv glTexCoord4fv +#define xglTexCoord4i glTexCoord4i +#define xglTexCoord4iv glTexCoord4iv +#define xglTexCoord4s glTexCoord4s +#define xglTexCoord4sv glTexCoord4sv +#ifdef GL_EXT_vertex_array +#define xglTexCoordPointerEXT glTexCoordPointerEXT +#endif +#define xglTexEnvf glTexEnvf +#define xglTexEnvfv glTexEnvfv +#define xglTexEnvi glTexEnvi +#define xglTexEnviv glTexEnviv +#define xglTexGend glTexGend +#define xglTexGendv glTexGendv +#define xglTexGenf glTexGenf +#define xglTexGenfv glTexGenfv +#define xglTexGeni glTexGeni +#define xglTexGeniv glTexGeniv +#define xglTexImage1D glTexImage1D +#define xglTexImage2D glTexImage2D +#define xglTexParameterf glTexParameterf +#define xglTexParameterfv glTexParameterfv +#define xglTexParameteri glTexParameteri +#define xglTexParameteriv glTexParameteriv +#define xglTranslated glTranslated +#define xglTranslatef glTranslatef +#define xglVertex2d glVertex2d +#define xglVertex2dv glVertex2dv +#define xglVertex2f glVertex2f +#define xglVertex2fv glVertex2fv +#define xglVertex2i glVertex2i +#define xglVertex2iv glVertex2iv +#define xglVertex2s glVertex2s +#define xglVertex2sv glVertex2sv +#define xglVertex3d glVertex3d +#define xglVertex3dv glVertex3dv +#define xglVertex3f glVertex3f +#define xglVertex3fv glVertex3fv +#define xglVertex3i glVertex3i +#define xglVertex3iv glVertex3iv +#define xglVertex3s glVertex3s +#define xglVertex3sv glVertex3sv +#define xglVertex4d glVertex4d +#define xglVertex4dv glVertex4dv +#define xglVertex4f glVertex4f +#define xglVertex4fv glVertex4fv +#define xglVertex4i glVertex4i +#define xglVertex4iv glVertex4iv +#define xglVertex4s glVertex4s +#define xglVertex4sv glVertex4sv +#ifdef GL_EXT_vertex_array +#define xglVertexPointerEXT glVertexPointerEXT +#endif +#define xglViewport glViewport + +#ifdef GL_VERSION_1_1 +#define xglAreTexturesResident glAreTexturesResident +#define xglIsTexture glIsTexture +#define xglBindTexture glBindTexture +#define xglDeleteTextures glDeleteTextures +#define xglGenTextures glGenTextures +#define xglPrioritizeTextures glPrioritizeTextures +#endif + +#ifdef GL_EXT_texture_object +#define xglAreTexturesResidentEXT glAreTexturesResidentEXT +#define xglIsTextureEXT glIsTextureEXT +#define xglBindTextureEXT glBindTextureEXT +#define xglDeleteTexturesEXT glDeleteTexturesEXT +#define xglGenTexturesEXT glGenTexturesEXT +#define xglPrioritizeTexturesEXT glPrioritizeTexturesEXT +#endif + +#define xglutAddMenuEntry glutAddMenuEntry +#define xglutAttachMenu glutAttachMenu +#define xglutCreateMenu glutCreateMenu +#define xglutCreateWindow glutCreateWindow +#define xglutDisplayFunc glutDisplayFunc +#define xglutIdleFunc glutIdleFunc +#define xglutInit glutInit +#define xglutInitDisplayMode glutInitDisplayMode +#define xglutInitWindowPosition glutInitWindowPosition +#define xglutInitWindowSize glutInitWindowSize +#define xglutKeyboardFunc glutKeyboardFunc +#define xglutMainLoopUpdate glutMainLoopUpdate +#define xglutPostRedisplay glutPostRedisplay +#define xglutPreMainLoop glutPreMainLoop +#define xglutReshapeFunc glutReshapeFunc +#define xglutSwapBuffers glutSwapBuffers + +#else + +#ifdef __cplusplus +extern "C" { +#endif + +GLboolean xglIsEnabled ( GLenum cap ) ; +GLboolean xglIsList ( GLuint list ) ; +GLenum xglGetError () ; +GLint xglRenderMode ( GLenum mode ) ; +GLuint xglGenLists ( GLsizei range ) ; +const GLubyte *xglGetString ( GLenum name ) ; + +void xglAccum ( GLenum op, GLfloat value ) ; +void xglAlphaFunc ( GLenum func, GLclampf ref ) ; +void xglArrayElementEXT ( GLint i ) ; +void xglBegin ( GLenum mode ) ; +void xglBitmap ( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap ) ; +void xglBlendColorEXT ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) ; +void xglBlendEquationEXT( GLenum mode ) ; +void xglBlendFunc ( GLenum sfactor, GLenum dfactor ) ; +void xglCallList ( GLuint list ) ; +void xglCallLists ( GLsizei n, GLenum type, GLvoid *lists ) ; +void xglClear ( GLbitfield mask ) ; +void xglClearAccum ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) ; +void xglClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) ; +void xglClearDepth ( GLclampd depth ) ; +void xglClearIndex ( GLfloat c ) ; +void xglClearStencil ( GLint s ) ; +void xglClipPlane ( GLenum plane, GLdouble *equation ) ; +void xglColor3b ( GLbyte red, GLbyte green, GLbyte blue ) ; +void xglColor3bv ( GLbyte *v ) ; +void xglColor3d ( GLdouble red, GLdouble green, GLdouble blue ) ; +void xglColor3dv ( GLdouble *v ) ; +void xglColor3f ( GLfloat red, GLfloat green, GLfloat blue ) ; +void xglColor3fv ( GLfloat *v ) ; +void xglColor3i ( GLint red, GLint green, GLint blue ) ; +void xglColor3iv ( GLint *v ) ; +void xglColor3s ( GLshort red, GLshort green, GLshort blue ) ; +void xglColor3sv ( GLshort *v ) ; +void xglColor3ub ( GLubyte red, GLubyte green, GLubyte blue ) ; +void xglColor3ubv ( GLubyte *v ) ; +void xglColor3ui ( GLuint red, GLuint green, GLuint blue ) ; +void xglColor3uiv ( GLuint *v ) ; +void xglColor3us ( GLushort red, GLushort green, GLushort blue ) ; +void xglColor3usv ( GLushort *v ) ; +void xglColor4b ( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ) ; +void xglColor4bv ( GLbyte *v ) ; +void xglColor4d ( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) ; +void xglColor4dv ( GLdouble *v ) ; +void xglColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) ; +void xglColor4fv ( GLfloat *v ) ; +void xglColor4i ( GLint red, GLint green, GLint blue, GLint alpha ) ; +void xglColor4iv ( GLint *v ) ; +void xglColor4s ( GLshort red, GLshort green, GLshort blue, GLshort alpha ) ; +void xglColor4sv ( GLshort *v ) ; +void xglColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) ; +void xglColor4ubv ( GLubyte *v ) ; +void xglColor4ui ( GLuint red, GLuint green, GLuint blue, GLuint alpha ) ; +void xglColor4uiv ( GLuint *v ) ; +void xglColor4us ( GLushort red, GLushort green, GLushort blue, GLushort alpha ) ; +void xglColor4usv ( GLushort *v ) ; +void xglColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) ; +void xglColorMaterial ( GLenum face, GLenum mode ) ; +void xglColorPointerEXT ( GLint size, GLenum type, GLsizei stride, GLsizei count, void *ptr ) ; +void xglCopyPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ) ; +void xglCullFace ( GLenum mode ) ; +void xglDeleteLists ( GLuint list, GLsizei range ) ; +void xglDepthFunc ( GLenum func ) ; +void xglDepthMask ( GLboolean flag ) ; +void xglDepthRange ( GLclampd near_val, GLclampd far_val ) ; +void xglDisable ( GLenum cap ) ; +void xglDrawArraysEXT ( GLenum mode, GLint first, GLsizei count ) ; +void xglDrawBuffer ( GLenum mode ) ; +void xglDrawPixels ( GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) ; +void xglEdgeFlag ( GLboolean flag ) ; +void xglEdgeFlagPointerEXT( GLsizei stride, GLsizei count, GLboolean *ptr ) ; +void xglEdgeFlagv ( GLboolean *flag ) ; +void xglEnable ( GLenum cap ) ; +void xglEnd () ; +void xglEndList () ; +void xglEvalCoord1d ( GLdouble u ) ; +void xglEvalCoord1dv ( GLdouble *u ) ; +void xglEvalCoord1f ( GLfloat u ) ; +void xglEvalCoord1fv ( GLfloat *u ) ; +void xglEvalCoord2d ( GLdouble u, GLdouble v ) ; +void xglEvalCoord2dv ( GLdouble *u ) ; +void xglEvalCoord2f ( GLfloat u, GLfloat v ) ; +void xglEvalCoord2fv ( GLfloat *u ) ; +void xglEvalMesh1 ( GLenum mode, GLint i1, GLint i2 ) ; +void xglEvalMesh2 ( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) ; +void xglEvalPoint1 ( GLint i ) ; +void xglEvalPoint2 ( GLint i, GLint j ) ; +void xglFeedbackBuffer ( GLsizei size, GLenum type, GLfloat *buffer ) ; +void xglFinish () ; +void xglFlush () ; +void xglFogf ( GLenum pname, GLfloat param ) ; +void xglFogfv ( GLenum pname, GLfloat *params ) ; +void xglFogi ( GLenum pname, GLint param ) ; +void xglFogiv ( GLenum pname, GLint *params ) ; +void xglFrontFace ( GLenum mode ) ; +void xglFrustum ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) ; +void xglGetBooleanv ( GLenum pname, GLboolean *params ) ; +void xglGetClipPlane ( GLenum plane, GLdouble *equation ) ; +void xglGetDoublev ( GLenum pname, GLdouble *params ) ; +void xglGetFloatv ( GLenum pname, GLfloat *params ) ; +void xglGetIntegerv ( GLenum pname, GLint *params ) ; +void xglGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) ; +void xglGetLightiv ( GLenum light, GLenum pname, GLint *params ) ; +void xglGetMapdv ( GLenum target, GLenum query, GLdouble *v ) ; +void xglGetMapfv ( GLenum target, GLenum query, GLfloat *v ) ; +void xglGetMapiv ( GLenum target, GLenum query, GLint *v ) ; +void xglGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) ; +void xglGetMaterialiv ( GLenum face, GLenum pname, GLint *params ) ; +void xglGetPixelMapfv ( GLenum map, GLfloat *values ) ; +void xglGetPixelMapuiv ( GLenum map, GLuint *values ) ; +void xglGetPixelMapusv ( GLenum map, GLushort *values ) ; +void xglGetPointervEXT ( GLenum pname, void **params ) ; +void xglGetPolygonStipple( GLubyte *mask ) ; +void xglGetTexEnvfv ( GLenum target, GLenum pname, GLfloat *params ) ; +void xglGetTexEnviv ( GLenum target, GLenum pname, GLint *params ) ; +void xglGetTexGendv ( GLenum coord, GLenum pname, GLdouble *params ) ; +void xglGetTexGenfv ( GLenum coord, GLenum pname, GLfloat *params ) ; +void xglGetTexGeniv ( GLenum coord, GLenum pname, GLint *params ) ; +void xglGetTexImage ( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ) ; +void xglGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params ) ; +void xglGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params ) ; +void xglGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params) ; +void xglGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) ; +void xglHint ( GLenum target, GLenum mode ) ; +void xglIndexMask ( GLuint mask ) ; +void xglIndexPointerEXT ( GLenum type, GLsizei stride, GLsizei count, void *ptr ) ; +void xglIndexd ( GLdouble c ) ; +void xglIndexdv ( GLdouble *c ) ; +void xglIndexf ( GLfloat c ) ; +void xglIndexfv ( GLfloat *c ) ; +void xglIndexi ( GLint c ) ; +void xglIndexiv ( GLint *c ) ; +void xglIndexs ( GLshort c ) ; +void xglIndexsv ( GLshort *c ) ; +void xglInitNames () ; +void xglLightModelf ( GLenum pname, GLfloat param ) ; +void xglLightModelfv ( GLenum pname, GLfloat *params ) ; +void xglLightModeli ( GLenum pname, GLint param ) ; +void xglLightModeliv ( GLenum pname, GLint *params ) ; +void xglLightf ( GLenum light, GLenum pname, GLfloat param ) ; +void xglLightfv ( GLenum light, GLenum pname, GLfloat *params ) ; +void xglLighti ( GLenum light, GLenum pname, GLint param ) ; +void xglLightiv ( GLenum light, GLenum pname, GLint *params ) ; +void xglLineStipple ( GLint factor, GLushort pattern ) ; +void xglLineWidth ( GLfloat width ) ; +void xglListBase ( GLuint base ) ; +void xglLoadIdentity () ; +void xglLoadMatrixd ( GLdouble *m ) ; +void xglLoadMatrixf ( GLfloat *m ) ; +void xglLoadName ( GLuint name ) ; +void xglLogicOp ( GLenum opcode ) ; +void xglMap1d ( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble *points ) ; +void xglMap1f ( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat *points ) ; +void xglMap2d ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble *points ) ; +void xglMap2f ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat *points ) ; +void xglMapGrid1d ( GLint un, GLdouble u1, GLdouble u2 ) ; +void xglMapGrid1f ( GLint un, GLfloat u1, GLfloat u2 ) ; +void xglMapGrid2d ( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ) ; +void xglMapGrid2f ( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ) ; +void xglMaterialf ( GLenum face, GLenum pname, GLfloat param ) ; +void xglMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) ; +void xglMateriali ( GLenum face, GLenum pname, GLint param ) ; +void xglMaterialiv ( GLenum face, GLenum pname, GLint *params ) ; +void xglMatrixMode ( GLenum mode ) ; +void xglMultMatrixd ( GLdouble *m ) ; +void xglMultMatrixf ( GLfloat *m ) ; +void xglNewList ( GLuint list, GLenum mode ) ; +void xglNormal3b ( GLbyte nx, GLbyte ny, GLbyte nz ) ; +void xglNormal3bv ( GLbyte *v ) ; +void xglNormal3d ( GLdouble nx, GLdouble ny, GLdouble nz ) ; +void xglNormal3dv ( GLdouble *v ) ; +void xglNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) ; +void xglNormal3fv ( GLfloat *v ) ; +void xglNormal3i ( GLint nx, GLint ny, GLint nz ) ; +void xglNormal3iv ( GLint *v ) ; +void xglNormal3s ( GLshort nx, GLshort ny, GLshort nz ) ; +void xglNormal3sv ( GLshort *v ) ; +void xglNormalPointerEXT( GLenum type, GLsizei stride, GLsizei count, void *ptr ) ; +void xglOrtho ( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) ; +void xglPassThrough ( GLfloat token ) ; +void xglPixelMapfv ( GLenum map, GLint mapsize, GLfloat *values ) ; +void xglPixelMapuiv ( GLenum map, GLint mapsize, GLuint *values ) ; +void xglPixelMapusv ( GLenum map, GLint mapsize, GLushort *values ) ; +void xglPixelStoref ( GLenum pname, GLfloat param ) ; +void xglPixelStorei ( GLenum pname, GLint param ) ; +void xglPixelTransferf ( GLenum pname, GLfloat param ) ; +void xglPixelTransferi ( GLenum pname, GLint param ) ; +void xglPixelZoom ( GLfloat xfactor, GLfloat yfactor ) ; +void xglPointSize ( GLfloat size ) ; +void xglPolygonMode ( GLenum face, GLenum mode ) ; +void xglPolygonOffsetEXT( GLfloat factor, GLfloat bias ) ; +void xglPolygonOffset ( GLfloat factor, GLfloat bias ) ; +void xglPolygonStipple ( GLubyte *mask ) ; +void xglPopAttrib () ; +void xglPopMatrix () ; +void xglPopName () ; +void xglPushAttrib ( GLbitfield mask ) ; +void xglPushMatrix () ; +void xglPushName ( GLuint name ) ; +void xglRasterPos2d ( GLdouble x, GLdouble y ) ; +void xglRasterPos2dv ( GLdouble *v ) ; +void xglRasterPos2f ( GLfloat x, GLfloat y ) ; +void xglRasterPos2fv ( GLfloat *v ) ; +void xglRasterPos2i ( GLint x, GLint y ) ; +void xglRasterPos2iv ( GLint *v ) ; +void xglRasterPos2s ( GLshort x, GLshort y ) ; +void xglRasterPos2sv ( GLshort *v ) ; +void xglRasterPos3d ( GLdouble x, GLdouble y, GLdouble z ) ; +void xglRasterPos3dv ( GLdouble *v ) ; +void xglRasterPos3f ( GLfloat x, GLfloat y, GLfloat z ) ; +void xglRasterPos3fv ( GLfloat *v ) ; +void xglRasterPos3i ( GLint x, GLint y, GLint z ) ; +void xglRasterPos3iv ( GLint *v ) ; +void xglRasterPos3s ( GLshort x, GLshort y, GLshort z ) ; +void xglRasterPos3sv ( GLshort *v ) ; +void xglRasterPos4d ( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) ; +void xglRasterPos4dv ( GLdouble *v ) ; +void xglRasterPos4f ( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) ; +void xglRasterPos4fv ( GLfloat *v ) ; +void xglRasterPos4i ( GLint x, GLint y, GLint z, GLint w ) ; +void xglRasterPos4iv ( GLint *v ) ; +void xglRasterPos4s ( GLshort x, GLshort y, GLshort z, GLshort w ) ; +void xglRasterPos4sv ( GLshort *v ) ; +void xglReadBuffer ( GLenum mode ) ; +void xglReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) ; +void xglRectd ( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ) ; +void xglRectdv ( GLdouble *v1, GLdouble *v2 ) ; +void xglRectf ( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) ; +void xglRectfv ( GLfloat *v1, GLfloat *v2 ) ; +void xglRecti ( GLint x1, GLint y1, GLint x2, GLint y2 ) ; +void xglRectiv ( GLint *v1, GLint *v2 ) ; +void xglRects ( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ) ; +void xglRectsv ( GLshort *v1, GLshort *v2 ) ; +void xglRotated ( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ) ; +void xglRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) ; +void xglScaled ( GLdouble x, GLdouble y, GLdouble z ) ; +void xglScalef ( GLfloat x, GLfloat y, GLfloat z ) ; +void xglScissor ( GLint x, GLint y, GLsizei width, GLsizei height) ; +void xglSelectBuffer ( GLsizei size, GLuint *buffer ) ; +void xglShadeModel ( GLenum mode ) ; +void xglStencilFunc ( GLenum func, GLint ref, GLuint mask ) ; +void xglStencilMask ( GLuint mask ) ; +void xglStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) ; +void xglTexCoord1d ( GLdouble s ) ; +void xglTexCoord1dv ( GLdouble *v ) ; +void xglTexCoord1f ( GLfloat s ) ; +void xglTexCoord1fv ( GLfloat *v ) ; +void xglTexCoord1i ( GLint s ) ; +void xglTexCoord1iv ( GLint *v ) ; +void xglTexCoord1s ( GLshort s ) ; +void xglTexCoord1sv ( GLshort *v ) ; +void xglTexCoord2d ( GLdouble s, GLdouble t ) ; +void xglTexCoord2dv ( GLdouble *v ) ; +void xglTexCoord2f ( GLfloat s, GLfloat t ) ; +void xglTexCoord2fv ( GLfloat *v ) ; +void xglTexCoord2i ( GLint s, GLint t ) ; +void xglTexCoord2iv ( GLint *v ) ; +void xglTexCoord2s ( GLshort s, GLshort t ) ; +void xglTexCoord2sv ( GLshort *v ) ; +void xglTexCoord3d ( GLdouble s, GLdouble t, GLdouble r ) ; +void xglTexCoord3dv ( GLdouble *v ) ; +void xglTexCoord3f ( GLfloat s, GLfloat t, GLfloat r ) ; +void xglTexCoord3fv ( GLfloat *v ) ; +void xglTexCoord3i ( GLint s, GLint t, GLint r ) ; +void xglTexCoord3iv ( GLint *v ) ; +void xglTexCoord3s ( GLshort s, GLshort t, GLshort r ) ; +void xglTexCoord3sv ( GLshort *v ) ; +void xglTexCoord4d ( GLdouble s, GLdouble t, GLdouble r, GLdouble q ) ; +void xglTexCoord4dv ( GLdouble *v ) ; +void xglTexCoord4f ( GLfloat s, GLfloat t, GLfloat r, GLfloat q ) ; +void xglTexCoord4fv ( GLfloat *v ) ; +void xglTexCoord4i ( GLint s, GLint t, GLint r, GLint q ) ; +void xglTexCoord4iv ( GLint *v ) ; +void xglTexCoord4s ( GLshort s, GLshort t, GLshort r, GLshort q ) ; +void xglTexCoord4sv ( GLshort *v ) ; +void xglTexCoordPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, void *ptr ) ; +void xglTexEnvf ( GLenum target, GLenum pname, GLfloat param ) ; +void xglTexEnvfv ( GLenum target, GLenum pname, GLfloat *params ) ; +void xglTexEnvi ( GLenum target, GLenum pname, GLint param ) ; +void xglTexEnviv ( GLenum target, GLenum pname, GLint *params ) ; +void xglTexGend ( GLenum coord, GLenum pname, GLdouble param ) ; +void xglTexGendv ( GLenum coord, GLenum pname, GLdouble *params ) ; +void xglTexGenf ( GLenum coord, GLenum pname, GLfloat param ) ; +void xglTexGenfv ( GLenum coord, GLenum pname, GLfloat *params ) ; +void xglTexGeni ( GLenum coord, GLenum pname, GLint param ) ; +void xglTexGeniv ( GLenum coord, GLenum pname, GLint *params ) ; +void xglTexImage1D ( GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid *pixels ) ; +void xglTexImage2D ( GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels ) ; +void xglTexParameterf ( GLenum target, GLenum pname, GLfloat param ) ; +void xglTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) ; +void xglTexParameteri ( GLenum target, GLenum pname, GLint param ) ; +void xglTexParameteriv ( GLenum target, GLenum pname, GLint *params ) ; +void xglTranslated ( GLdouble x, GLdouble y, GLdouble z ) ; +void xglTranslatef ( GLfloat x, GLfloat y, GLfloat z ) ; +void xglVertex2d ( GLdouble x, GLdouble y ) ; +void xglVertex2dv ( GLdouble *v ) ; +void xglVertex2f ( GLfloat x, GLfloat y ) ; +void xglVertex2fv ( GLfloat *v ) ; +void xglVertex2i ( GLint x, GLint y ) ; +void xglVertex2iv ( GLint *v ) ; +void xglVertex2s ( GLshort x, GLshort y ) ; +void xglVertex2sv ( GLshort *v ) ; +void xglVertex3d ( GLdouble x, GLdouble y, GLdouble z ) ; +void xglVertex3dv ( GLdouble *v ) ; +void xglVertex3f ( GLfloat x, GLfloat y, GLfloat z ) ; +void xglVertex3fv ( GLfloat *v ) ; +void xglVertex3i ( GLint x, GLint y, GLint z ) ; +void xglVertex3iv ( GLint *v ) ; +void xglVertex3s ( GLshort x, GLshort y, GLshort z ) ; +void xglVertex3sv ( GLshort *v ) ; +void xglVertex4d ( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) ; +void xglVertex4dv ( GLdouble *v ) ; +void xglVertex4f ( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) ; +void xglVertex4fv ( GLfloat *v ) ; +void xglVertex4i ( GLint x, GLint y, GLint z, GLint w ) ; +void xglVertex4iv ( GLint *v ) ; +void xglVertex4s ( GLshort x, GLshort y, GLshort z, GLshort w ) ; +void xglVertex4sv ( GLshort *v ) ; +void xglVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, void *ptr ) ; +void xglViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) ; + +void xglutAddMenuEntry ( char *label, int value ) ; +void xglutAttachMenu ( int button ) ; +int xglutCreateMenu ( void (*)(int) ) ; +int xglutCreateWindow ( char *title ) ; +void xglutDisplayFunc ( void (*)(void) ) ; +void xglutIdleFunc ( void (*)(void) ) ; +void xglutInit ( int *argcp, char **argv ) ; +void xglutInitDisplayMode ( unsigned int mode ) ; +void xglutInitWindowPosition ( int x, int y ) ; +void xglutInitWindowSize ( int width, int height ) ; +void xglutKeyboardFunc ( void (*)(unsigned char key, int x, int y) ) ; +void xglutMainLoopUpdate () ; +void xglutPostRedisplay () ; +void xglutPreMainLoop () ; +void xglutReshapeFunc ( void (*)(int width, int height) ) ; +void xglutSwapBuffers () ; + +GLboolean xglAreTexturesResident( GLsizei n, GLuint *textures, GLboolean *residences ) ; +GLboolean xglIsTexture ( GLuint texture ) ; +void xglBindTexture ( GLenum target, GLuint texture ) ; +void xglDeleteTextures ( GLsizei n, GLuint *textures ) ; +void xglGenTextures ( GLsizei n, GLuint *textures ) ; +void xglPrioritizeTextures ( GLsizei n, GLuint *textures, GLclampf *priorities ) ; + +GLboolean xglAreTexturesResidentEXT ( GLsizei n, GLuint *textures, GLboolean *residences ) ; +GLboolean xglIsTextureEXT ( GLuint texture ) ; +void xglBindTextureEXT ( GLenum target, GLuint texture ) ; +void xglDeleteTexturesEXT ( GLsizei n, GLuint *textures ) ; +void xglGenTexturesEXT ( GLsizei n, GLuint *textures ) ; +void xglPrioritizeTexturesEXT ( GLsizei n, GLuint *textures, GLclampf *priorities ) ; + +#ifdef __cplusplus +}; +#endif + +#endif + diff --git a/XGL/xglUtils.c b/XGL/xglUtils.c new file mode 100644 index 000000000..3f4f452e5 --- /dev/null +++ b/XGL/xglUtils.c @@ -0,0 +1,674 @@ + +#include +#include + +#ifndef __CYGWIN32__ +# include +#endif + +#ifdef WIN32 +# include +#else +# include +#endif + +#include "xgl.h" + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +int xglTraceOn = TRUE ; +FILE *xglTraceFd = stdout ; + +struct GLenumLookup +{ + GLenum val ; + char *name ; +} ; + +static struct GLenumLookup glenum_string [] = +{ +/* + Due to ambiguity - these are not in the table... + + GL_NONE = , GL_ZERO = GL_FALSE = GL_POINTS = 0 + GL_ONE = , GL_TRUE = GL_LINES = 1 +*/ + { GL_2D ,"GL_2D" }, + { GL_2_BYTES ,"GL_2_BYTES" }, + { GL_3D ,"GL_3D" }, + { GL_3D_COLOR ,"GL_3D_COLOR" }, + { GL_3D_COLOR_TEXTURE ,"GL_3D_COLOR_TEXTURE" }, + { GL_3_BYTES ,"GL_3_BYTES" }, + { GL_4D_COLOR_TEXTURE ,"GL_4D_COLOR_TEXTURE" }, + { GL_4_BYTES ,"GL_4_BYTES" }, + { GL_ACCUM ,"GL_ACCUM" }, + { GL_ACCUM_ALPHA_BITS ,"GL_ACCUM_ALPHA_BITS" }, + { GL_ACCUM_BLUE_BITS ,"GL_ACCUM_BLUE_BITS" }, + { GL_ACCUM_CLEAR_VALUE ,"GL_ACCUM_CLEAR_VALUE" }, + { GL_ACCUM_GREEN_BITS ,"GL_ACCUM_GREEN_BITS" }, + { GL_ACCUM_RED_BITS ,"GL_ACCUM_RED_BITS" }, + { GL_ADD ,"GL_ADD" }, + { GL_ALPHA ,"GL_ALPHA" }, + { GL_ALPHA_BIAS ,"GL_ALPHA_BIAS" }, + { GL_ALPHA_BITS ,"GL_ALPHA_BITS" }, + { GL_ALPHA_SCALE ,"GL_ALPHA_SCALE" }, + { GL_ALPHA_TEST ,"GL_ALPHA_TEST" }, + { GL_ALPHA_TEST_FUNC ,"GL_ALPHA_TEST_FUNC" }, + { GL_ALPHA_TEST_REF ,"GL_ALPHA_TEST_REF" }, + { GL_ALWAYS ,"GL_ALWAYS" }, + { GL_AMBIENT ,"GL_AMBIENT" }, + { GL_AMBIENT_AND_DIFFUSE ,"GL_AMBIENT_AND_DIFFUSE" }, + { GL_AND ,"GL_AND" }, + { GL_AND_INVERTED ,"GL_AND_INVERTED" }, + { GL_AND_REVERSE ,"GL_AND_REVERSE" }, + { GL_ATTRIB_STACK_DEPTH ,"GL_ATTRIB_STACK_DEPTH" }, + { GL_AUTO_NORMAL ,"GL_AUTO_NORMAL" }, + { GL_AUX0 ,"GL_AUX0" }, + { GL_AUX1 ,"GL_AUX1" }, + { GL_AUX2 ,"GL_AUX2" }, + { GL_AUX3 ,"GL_AUX3" }, + { GL_AUX_BUFFERS ,"GL_AUX_BUFFERS" }, + { GL_BACK ,"GL_BACK" }, + { GL_BACK_LEFT ,"GL_BACK_LEFT" }, + { GL_BACK_RIGHT ,"GL_BACK_RIGHT" }, + { GL_BITMAP ,"GL_BITMAP" }, + { GL_BITMAP_TOKEN ,"GL_BITMAP_TOKEN" }, + { GL_BLEND ,"GL_BLEND" }, + { GL_BLEND_DST ,"GL_BLEND_DST" }, +#ifdef GL_BLEND_COLOR_EXT + { GL_BLEND_COLOR_EXT ,"GL_BLEND_COLOR_EXT" }, +#endif +#ifdef GL_BLEND_EQUATION_EXT + { GL_BLEND_EQUATION_EXT ,"GL_BLEND_EQUATION_EXT" }, +#endif + { GL_BLEND_SRC ,"GL_BLEND_SRC" }, + { GL_BLUE ,"GL_BLUE" }, + { GL_BLUE_BIAS ,"GL_BLUE_BIAS" }, + { GL_BLUE_BITS ,"GL_BLUE_BITS" }, + { GL_BLUE_SCALE ,"GL_BLUE_SCALE" }, + { GL_BYTE ,"GL_BYTE" }, + { GL_CCW ,"GL_CCW" }, + { GL_CLAMP ,"GL_CLAMP" }, + { GL_CLEAR ,"GL_CLEAR" }, + { GL_CLIP_PLANE0 ,"GL_CLIP_PLANE0" }, + { GL_CLIP_PLANE1 ,"GL_CLIP_PLANE1" }, + { GL_CLIP_PLANE2 ,"GL_CLIP_PLANE2" }, + { GL_CLIP_PLANE3 ,"GL_CLIP_PLANE3" }, + { GL_CLIP_PLANE4 ,"GL_CLIP_PLANE4" }, + { GL_CLIP_PLANE5 ,"GL_CLIP_PLANE5" }, + { GL_COEFF ,"GL_COEFF" }, + { GL_COLOR ,"GL_COLOR" }, +#ifdef GL_COLOR_ARRAY_EXT + { GL_COLOR_ARRAY_COUNT_EXT ,"GL_COLOR_ARRAY_COUNT_EXT" }, + { GL_COLOR_ARRAY_EXT ,"GL_COLOR_ARRAY_EXT" }, + { GL_COLOR_ARRAY_POINTER_EXT ,"GL_COLOR_ARRAY_POINTER_EXT" }, + { GL_COLOR_ARRAY_SIZE_EXT ,"GL_COLOR_ARRAY_SIZE_EXT" }, + { GL_COLOR_ARRAY_STRIDE_EXT ,"GL_COLOR_ARRAY_STRIDE_EXT" }, + { GL_COLOR_ARRAY_TYPE_EXT ,"GL_COLOR_ARRAY_TYPE_EXT" }, +#endif + { GL_COLOR_CLEAR_VALUE ,"GL_COLOR_CLEAR_VALUE" }, + { GL_COLOR_INDEX ,"GL_COLOR_INDEX" }, + { GL_COLOR_INDEXES ,"GL_COLOR_INDEXES" }, + { GL_COLOR_MATERIAL ,"GL_COLOR_MATERIAL" }, + { GL_COLOR_MATERIAL_FACE ,"GL_COLOR_MATERIAL_FACE" }, + { GL_COLOR_MATERIAL_PARAMETER ,"GL_COLOR_MATERIAL_PARAMETER" }, + { GL_COLOR_WRITEMASK ,"GL_COLOR_WRITEMASK" }, + { GL_COMPILE ,"GL_COMPILE" }, + { GL_COMPILE_AND_EXECUTE ,"GL_COMPILE_AND_EXECUTE" }, +#ifdef GL_CONSTANT_ALPHA_EXT + { GL_CONSTANT_ALPHA_EXT ,"GL_CONSTANT_ALPHA_EXT" }, +#endif + { GL_CONSTANT_ATTENUATION ,"GL_CONSTANT_ATTENUATION" }, +#ifdef GL_CONSTANT_COLOR_EXT + { GL_CONSTANT_COLOR_EXT ,"GL_CONSTANT_COLOR_EXT" }, +#endif + { GL_COPY ,"GL_COPY" }, + { GL_COPY_INVERTED ,"GL_COPY_INVERTED" }, + { GL_COPY_PIXEL_TOKEN ,"GL_COPY_PIXEL_TOKEN" }, + { GL_CULL_FACE ,"GL_CULL_FACE" }, + { GL_CULL_FACE_MODE ,"GL_CULL_FACE_MODE" }, + { GL_CURRENT_COLOR ,"GL_CURRENT_COLOR" }, + { GL_CURRENT_INDEX ,"GL_CURRENT_INDEX" }, + { GL_CURRENT_NORMAL ,"GL_CURRENT_NORMAL" }, + { GL_CURRENT_RASTER_COLOR ,"GL_CURRENT_RASTER_COLOR" }, + { GL_CURRENT_RASTER_DISTANCE ,"GL_CURRENT_RASTER_DISTANCE" }, + { GL_CURRENT_RASTER_INDEX ,"GL_CURRENT_RASTER_INDEX" }, + { GL_CURRENT_RASTER_POSITION ,"GL_CURRENT_RASTER_POSITION" }, + { GL_CURRENT_RASTER_POSITION_VALID,"GL_CURRENT_RASTER_POSITION_VALID" }, + { GL_CURRENT_RASTER_TEXTURE_COORDS,"GL_CURRENT_RASTER_TEXTURE_COORDS" }, + { GL_CURRENT_TEXTURE_COORDS ,"GL_CURRENT_TEXTURE_COORDS" }, + { GL_CW ,"GL_CW" }, + { GL_DECAL ,"GL_DECAL" }, + { GL_DECR ,"GL_DECR" }, + { GL_DEPTH ,"GL_DEPTH" }, + { GL_DEPTH_BIAS ,"GL_DEPTH_BIAS" }, + { GL_DEPTH_BITS ,"GL_DEPTH_BITS" }, + { GL_DEPTH_CLEAR_VALUE ,"GL_DEPTH_CLEAR_VALUE" }, + { GL_DEPTH_COMPONENT ,"GL_DEPTH_COMPONENT" }, + { GL_DEPTH_FUNC ,"GL_DEPTH_FUNC" }, + { GL_DEPTH_RANGE ,"GL_DEPTH_RANGE" }, + { GL_DEPTH_SCALE ,"GL_DEPTH_SCALE" }, + { GL_DEPTH_TEST ,"GL_DEPTH_TEST" }, + { GL_DEPTH_WRITEMASK ,"GL_DEPTH_WRITEMASK" }, + { GL_DIFFUSE ,"GL_DIFFUSE" }, + { GL_DITHER ,"GL_DITHER" }, + { GL_DOMAIN ,"GL_DOMAIN" }, + { GL_DONT_CARE ,"GL_DONT_CARE" }, + { GL_DOUBLEBUFFER ,"GL_DOUBLEBUFFER" }, +#ifdef GL_DOUBLE_EXT + { GL_DOUBLE_EXT ,"GL_DOUBLE_EXT" }, +#endif + { GL_DRAW_BUFFER ,"GL_DRAW_BUFFER" }, + { GL_DRAW_PIXEL_TOKEN ,"GL_DRAW_PIXEL_TOKEN" }, + { GL_DST_ALPHA ,"GL_DST_ALPHA" }, + { GL_DST_COLOR ,"GL_DST_COLOR" }, + { GL_EDGE_FLAG ,"GL_EDGE_FLAG" }, +#ifdef GL_EDGE_FLAG_ARRAY_EXT + { GL_EDGE_FLAG_ARRAY_COUNT_EXT,"GL_EDGE_FLAG_ARRAY_COUNT_EXT" }, + { GL_EDGE_FLAG_ARRAY_EXT ,"GL_EDGE_FLAG_ARRAY_EXT" }, + { GL_EDGE_FLAG_ARRAY_POINTER_EXT,"GL_EDGE_FLAG_ARRAY_POINTER_EXT" }, + { GL_EDGE_FLAG_ARRAY_STRIDE_EXT,"GL_EDGE_FLAG_ARRAY_STRIDE_EXT" }, +#endif + { GL_EMISSION ,"GL_EMISSION" }, + { GL_EQUAL ,"GL_EQUAL" }, + { GL_EQUIV ,"GL_EQUIV" }, + { GL_EXP ,"GL_EXP" }, + { GL_EXP2 ,"GL_EXP2" }, + { GL_EXTENSIONS ,"GL_EXTENSIONS" }, + { GL_EYE_LINEAR ,"GL_EYE_LINEAR" }, + { GL_EYE_PLANE ,"GL_EYE_PLANE" }, + { GL_FASTEST ,"GL_FASTEST" }, + { GL_FEEDBACK ,"GL_FEEDBACK" }, + { GL_FILL ,"GL_FILL" }, + { GL_FLAT ,"GL_FLAT" }, + { GL_FLOAT ,"GL_FLOAT" }, + { GL_FOG ,"GL_FOG" }, + { GL_FOG_COLOR ,"GL_FOG_COLOR" }, + { GL_FOG_DENSITY ,"GL_FOG_DENSITY" }, + { GL_FOG_END ,"GL_FOG_END" }, + { GL_FOG_HINT ,"GL_FOG_HINT" }, + { GL_FOG_INDEX ,"GL_FOG_INDEX" }, + { GL_FOG_MODE ,"GL_FOG_MODE" }, + { GL_FOG_START ,"GL_FOG_START" }, + { GL_FRONT ,"GL_FRONT" }, + { GL_FRONT_AND_BACK ,"GL_FRONT_AND_BACK" }, + { GL_FRONT_FACE ,"GL_FRONT_FACE" }, + { GL_FRONT_LEFT ,"GL_FRONT_LEFT" }, + { GL_FRONT_RIGHT ,"GL_FRONT_RIGHT" }, +#ifdef GL_FUNC_ADD_EXT + { GL_FUNC_ADD_EXT ,"GL_FUNC_ADD_EXT" }, + { GL_FUNC_REVERSE_SUBTRACT_EXT,"GL_FUNC_REVERSE_SUBTRACT_EXT" }, + { GL_FUNC_SUBTRACT_EXT ,"GL_FUNC_SUBTRACT_EXT" }, +#endif + { GL_GEQUAL ,"GL_GEQUAL" }, + { GL_GREATER ,"GL_GREATER" }, + { GL_GREEN ,"GL_GREEN" }, + { GL_GREEN_BIAS ,"GL_GREEN_BIAS" }, + { GL_GREEN_BITS ,"GL_GREEN_BITS" }, + { GL_GREEN_SCALE ,"GL_GREEN_SCALE" }, + { GL_INCR ,"GL_INCR" }, +#ifdef GL_INDEX_ARRAY_EXT + { GL_INDEX_ARRAY_COUNT_EXT ,"GL_INDEX_ARRAY_COUNT_EXT" }, + { GL_INDEX_ARRAY_EXT ,"GL_INDEX_ARRAY_EXT" }, + { GL_INDEX_ARRAY_POINTER_EXT ,"GL_INDEX_ARRAY_POINTER_EXT" }, + { GL_INDEX_ARRAY_STRIDE_EXT ,"GL_INDEX_ARRAY_STRIDE_EXT" }, + { GL_INDEX_ARRAY_TYPE_EXT ,"GL_INDEX_ARRAY_TYPE_EXT" }, +#endif + { GL_INDEX_BITS ,"GL_INDEX_BITS" }, + { GL_INDEX_CLEAR_VALUE ,"GL_INDEX_CLEAR_VALUE" }, + { GL_INDEX_MODE ,"GL_INDEX_MODE" }, + { GL_INDEX_OFFSET ,"GL_INDEX_OFFSET" }, + { GL_INDEX_SHIFT ,"GL_INDEX_SHIFT" }, + { GL_INDEX_WRITEMASK ,"GL_INDEX_WRITEMASK" }, + { GL_INT ,"GL_INT" }, + { GL_INVALID_ENUM ,"GL_INVALID_ENUM" }, + { GL_INVALID_OPERATION ,"GL_INVALID_OPERATION" }, + { GL_INVALID_VALUE ,"GL_INVALID_VALUE" }, + { GL_INVERT ,"GL_INVERT" }, + { GL_KEEP ,"GL_KEEP" }, + { GL_LEFT ,"GL_LEFT" }, + { GL_LEQUAL ,"GL_LEQUAL" }, + { GL_LESS ,"GL_LESS" }, + { GL_LIGHT0 ,"GL_LIGHT0" }, + { GL_LIGHT1 ,"GL_LIGHT1" }, + { GL_LIGHT2 ,"GL_LIGHT2" }, + { GL_LIGHT3 ,"GL_LIGHT3" }, + { GL_LIGHT4 ,"GL_LIGHT4" }, + { GL_LIGHT5 ,"GL_LIGHT5" }, + { GL_LIGHT6 ,"GL_LIGHT6" }, + { GL_LIGHT7 ,"GL_LIGHT7" }, + { GL_LIGHTING ,"GL_LIGHTING" }, + { GL_LIGHT_MODEL_AMBIENT ,"GL_LIGHT_MODEL_AMBIENT" }, + { GL_LIGHT_MODEL_LOCAL_VIEWER ,"GL_LIGHT_MODEL_LOCAL_VIEWER" }, + { GL_LIGHT_MODEL_TWO_SIDE ,"GL_LIGHT_MODEL_TWO_SIDE" }, + { GL_LINE ,"GL_LINE" }, + { GL_LINEAR ,"GL_LINEAR" }, + { GL_LINEAR_ATTENUATION ,"GL_LINEAR_ATTENUATION" }, + { GL_LINEAR_MIPMAP_LINEAR ,"GL_LINEAR_MIPMAP_LINEAR" }, + { GL_LINEAR_MIPMAP_NEAREST ,"GL_LINEAR_MIPMAP_NEAREST" }, + { GL_LINE_LOOP ,"GL_LINE_LOOP" }, + { GL_LINE_RESET_TOKEN ,"GL_LINE_RESET_TOKEN" }, + { GL_LINE_SMOOTH ,"GL_LINE_SMOOTH" }, + { GL_LINE_SMOOTH_HINT ,"GL_LINE_SMOOTH_HINT" }, + { GL_LINE_STIPPLE ,"GL_LINE_STIPPLE" }, + { GL_LINE_STIPPLE_PATTERN ,"GL_LINE_STIPPLE_PATTERN" }, + { GL_LINE_STIPPLE_REPEAT ,"GL_LINE_STIPPLE_REPEAT" }, + { GL_LINE_STRIP ,"GL_LINE_STRIP" }, + { GL_LINE_TOKEN ,"GL_LINE_TOKEN" }, + { GL_LINE_WIDTH ,"GL_LINE_WIDTH" }, + { GL_LINE_WIDTH_GRANULARITY ,"GL_LINE_WIDTH_GRANULARITY" }, + { GL_LINE_WIDTH_RANGE ,"GL_LINE_WIDTH_RANGE" }, + { GL_LIST_BASE ,"GL_LIST_BASE" }, + { GL_LIST_INDEX ,"GL_LIST_INDEX" }, + { GL_LIST_MODE ,"GL_LIST_MODE" }, + { GL_LOAD ,"GL_LOAD" }, + { GL_LOGIC_OP ,"GL_LOGIC_OP" }, + { GL_LOGIC_OP_MODE ,"GL_LOGIC_OP_MODE" }, + { GL_LUMINANCE ,"GL_LUMINANCE" }, + { GL_LUMINANCE_ALPHA ,"GL_LUMINANCE_ALPHA" }, + { GL_MAP1_COLOR_4 ,"GL_MAP1_COLOR_4" }, + { GL_MAP1_GRID_DOMAIN ,"GL_MAP1_GRID_DOMAIN" }, + { GL_MAP1_GRID_SEGMENTS ,"GL_MAP1_GRID_SEGMENTS" }, + { GL_MAP1_INDEX ,"GL_MAP1_INDEX" }, + { GL_MAP1_NORMAL ,"GL_MAP1_NORMAL" }, + { GL_MAP1_TEXTURE_COORD_1 ,"GL_MAP1_TEXTURE_COORD_1" }, + { GL_MAP1_TEXTURE_COORD_2 ,"GL_MAP1_TEXTURE_COORD_2" }, + { GL_MAP1_TEXTURE_COORD_3 ,"GL_MAP1_TEXTURE_COORD_3" }, + { GL_MAP1_TEXTURE_COORD_4 ,"GL_MAP1_TEXTURE_COORD_4" }, + { GL_MAP1_VERTEX_3 ,"GL_MAP1_VERTEX_3" }, + { GL_MAP1_VERTEX_4 ,"GL_MAP1_VERTEX_4" }, + { GL_MAP2_COLOR_4 ,"GL_MAP2_COLOR_4" }, + { GL_MAP2_GRID_DOMAIN ,"GL_MAP2_GRID_DOMAIN" }, + { GL_MAP2_GRID_SEGMENTS ,"GL_MAP2_GRID_SEGMENTS" }, + { GL_MAP2_INDEX ,"GL_MAP2_INDEX" }, + { GL_MAP2_NORMAL ,"GL_MAP2_NORMAL" }, + { GL_MAP2_TEXTURE_COORD_1 ,"GL_MAP2_TEXTURE_COORD_1" }, + { GL_MAP2_TEXTURE_COORD_2 ,"GL_MAP2_TEXTURE_COORD_2" }, + { GL_MAP2_TEXTURE_COORD_3 ,"GL_MAP2_TEXTURE_COORD_3" }, + { GL_MAP2_TEXTURE_COORD_4 ,"GL_MAP2_TEXTURE_COORD_4" }, + { GL_MAP2_VERTEX_3 ,"GL_MAP2_VERTEX_3" }, + { GL_MAP2_VERTEX_4 ,"GL_MAP2_VERTEX_4" }, + { GL_MAP_COLOR ,"GL_MAP_COLOR" }, + { GL_MAP_STENCIL ,"GL_MAP_STENCIL" }, + { GL_MATRIX_MODE ,"GL_MATRIX_MODE" }, + { GL_MAX_ATTRIB_STACK_DEPTH ,"GL_MAX_ATTRIB_STACK_DEPTH" }, + { GL_MAX_CLIP_PLANES ,"GL_MAX_CLIP_PLANES" }, + { GL_MAX_EVAL_ORDER ,"GL_MAX_EVAL_ORDER" }, +#ifdef GL_MAX_EXT + { GL_MAX_EXT ,"GL_MAX_EXT" }, +#endif + { GL_MAX_LIGHTS ,"GL_MAX_LIGHTS" }, + { GL_MAX_LIST_NESTING ,"GL_MAX_LIST_NESTING" }, + { GL_MAX_MODELVIEW_STACK_DEPTH,"GL_MAX_MODELVIEW_STACK_DEPTH" }, + { GL_MAX_NAME_STACK_DEPTH ,"GL_MAX_NAME_STACK_DEPTH" }, + { GL_MAX_PIXEL_MAP_TABLE ,"GL_MAX_PIXEL_MAP_TABLE" }, + { GL_MAX_PROJECTION_STACK_DEPTH,"GL_MAX_PROJECTION_STACK_DEPTH" }, + { GL_MAX_TEXTURE_SIZE ,"GL_MAX_TEXTURE_SIZE" }, + { GL_MAX_TEXTURE_STACK_DEPTH ,"GL_MAX_TEXTURE_STACK_DEPTH" }, + { GL_MAX_VIEWPORT_DIMS ,"GL_MAX_VIEWPORT_DIMS" }, +#ifdef GL_MIN_EXT + { GL_MIN_EXT ,"GL_MIN_EXT" }, +#endif + { GL_MODELVIEW ,"GL_MODELVIEW" }, + { GL_MODELVIEW_MATRIX ,"GL_MODELVIEW_MATRIX" }, + { GL_MODELVIEW_STACK_DEPTH ,"GL_MODELVIEW_STACK_DEPTH" }, + { GL_MODULATE ,"GL_MODULATE" }, + { GL_MULT ,"GL_MULT" }, + { GL_NAME_STACK_DEPTH ,"GL_NAME_STACK_DEPTH" }, + { GL_NAND ,"GL_NAND" }, + { GL_NEAREST ,"GL_NEAREST" }, + { GL_NEAREST_MIPMAP_LINEAR ,"GL_NEAREST_MIPMAP_LINEAR" }, + { GL_NEAREST_MIPMAP_NEAREST ,"GL_NEAREST_MIPMAP_NEAREST" }, + { GL_NEVER ,"GL_NEVER" }, + { GL_NICEST ,"GL_NICEST" }, + { GL_NOOP ,"GL_NOOP" }, + { GL_NOR ,"GL_NOR" }, + { GL_NORMALIZE ,"GL_NORMALIZE" }, +#ifdef GL_NORMAL_ARRAY_EXT + { GL_NORMAL_ARRAY_COUNT_EXT ,"GL_NORMAL_ARRAY_COUNT_EXT" }, + { GL_NORMAL_ARRAY_EXT ,"GL_NORMAL_ARRAY_EXT" }, + { GL_NORMAL_ARRAY_POINTER_EXT ,"GL_NORMAL_ARRAY_POINTER_EXT" }, + { GL_NORMAL_ARRAY_STRIDE_EXT ,"GL_NORMAL_ARRAY_STRIDE_EXT" }, + { GL_NORMAL_ARRAY_TYPE_EXT ,"GL_NORMAL_ARRAY_TYPE_EXT" }, +#endif + { GL_NOTEQUAL ,"GL_NOTEQUAL" }, + { GL_OBJECT_LINEAR ,"GL_OBJECT_LINEAR" }, + { GL_OBJECT_PLANE ,"GL_OBJECT_PLANE" }, +#ifdef GL_ONE_MINUS_CONSTANT_ALPHA_EXT + { GL_ONE_MINUS_CONSTANT_ALPHA_EXT,"GL_ONE_MINUS_CONSTANT_ALPHA_EXT" }, + { GL_ONE_MINUS_CONSTANT_COLOR_EXT,"GL_ONE_MINUS_CONSTANT_COLOR_EXT" }, +#endif + { GL_ONE_MINUS_DST_ALPHA ,"GL_ONE_MINUS_DST_ALPHA" }, + { GL_ONE_MINUS_DST_COLOR ,"GL_ONE_MINUS_DST_COLOR" }, + { GL_ONE_MINUS_SRC_ALPHA ,"GL_ONE_MINUS_SRC_ALPHA" }, + { GL_ONE_MINUS_SRC_COLOR ,"GL_ONE_MINUS_SRC_COLOR" }, + { GL_OR ,"GL_OR" }, + { GL_ORDER ,"GL_ORDER" }, + { GL_OR_INVERTED ,"GL_OR_INVERTED" }, + { GL_OR_REVERSE ,"GL_OR_REVERSE" }, + { GL_OUT_OF_MEMORY ,"GL_OUT_OF_MEMORY" }, + { GL_PACK_ALIGNMENT ,"GL_PACK_ALIGNMENT" }, + { GL_PACK_LSB_FIRST ,"GL_PACK_LSB_FIRST" }, + { GL_PACK_ROW_LENGTH ,"GL_PACK_ROW_LENGTH" }, + { GL_PACK_SKIP_PIXELS ,"GL_PACK_SKIP_PIXELS" }, + { GL_PACK_SKIP_ROWS ,"GL_PACK_SKIP_ROWS" }, + { GL_PACK_SWAP_BYTES ,"GL_PACK_SWAP_BYTES" }, + { GL_PASS_THROUGH_TOKEN ,"GL_PASS_THROUGH_TOKEN" }, + { GL_PERSPECTIVE_CORRECTION_HINT,"GL_PERSPECTIVE_CORRECTION_HINT" }, + { GL_PIXEL_MAP_A_TO_A ,"GL_PIXEL_MAP_A_TO_A" }, + { GL_PIXEL_MAP_A_TO_A_SIZE ,"GL_PIXEL_MAP_A_TO_A_SIZE" }, + { GL_PIXEL_MAP_B_TO_B ,"GL_PIXEL_MAP_B_TO_B" }, + { GL_PIXEL_MAP_B_TO_B_SIZE ,"GL_PIXEL_MAP_B_TO_B_SIZE" }, + { GL_PIXEL_MAP_G_TO_G ,"GL_PIXEL_MAP_G_TO_G" }, + { GL_PIXEL_MAP_G_TO_G_SIZE ,"GL_PIXEL_MAP_G_TO_G_SIZE" }, + { GL_PIXEL_MAP_I_TO_A ,"GL_PIXEL_MAP_I_TO_A" }, + { GL_PIXEL_MAP_I_TO_A_SIZE ,"GL_PIXEL_MAP_I_TO_A_SIZE" }, + { GL_PIXEL_MAP_I_TO_B ,"GL_PIXEL_MAP_I_TO_B" }, + { GL_PIXEL_MAP_I_TO_B_SIZE ,"GL_PIXEL_MAP_I_TO_B_SIZE" }, + { GL_PIXEL_MAP_I_TO_G ,"GL_PIXEL_MAP_I_TO_G" }, + { GL_PIXEL_MAP_I_TO_G_SIZE ,"GL_PIXEL_MAP_I_TO_G_SIZE" }, + { GL_PIXEL_MAP_I_TO_I ,"GL_PIXEL_MAP_I_TO_I" }, + { GL_PIXEL_MAP_I_TO_I_SIZE ,"GL_PIXEL_MAP_I_TO_I_SIZE" }, + { GL_PIXEL_MAP_I_TO_R ,"GL_PIXEL_MAP_I_TO_R" }, + { GL_PIXEL_MAP_I_TO_R_SIZE ,"GL_PIXEL_MAP_I_TO_R_SIZE" }, + { GL_PIXEL_MAP_R_TO_R ,"GL_PIXEL_MAP_R_TO_R" }, + { GL_PIXEL_MAP_R_TO_R_SIZE ,"GL_PIXEL_MAP_R_TO_R_SIZE" }, + { GL_PIXEL_MAP_S_TO_S ,"GL_PIXEL_MAP_S_TO_S" }, + { GL_PIXEL_MAP_S_TO_S_SIZE ,"GL_PIXEL_MAP_S_TO_S_SIZE" }, + { GL_POINT ,"GL_POINT" }, + { GL_POINT_SIZE ,"GL_POINT_SIZE" }, + { GL_POINT_SIZE_GRANULARITY ,"GL_POINT_SIZE_GRANULARITY" }, + { GL_POINT_SIZE_RANGE ,"GL_POINT_SIZE_RANGE" }, + { GL_POINT_SMOOTH ,"GL_POINT_SMOOTH" }, + { GL_POINT_SMOOTH_HINT ,"GL_POINT_SMOOTH_HINT" }, + { GL_POINT_TOKEN ,"GL_POINT_TOKEN" }, + { GL_POLYGON ,"GL_POLYGON" }, + { GL_POLYGON_MODE ,"GL_POLYGON_MODE" }, + { GL_POLYGON_SMOOTH ,"GL_POLYGON_SMOOTH" }, + { GL_POLYGON_SMOOTH_HINT ,"GL_POLYGON_SMOOTH_HINT" }, + { GL_POLYGON_STIPPLE ,"GL_POLYGON_STIPPLE" }, +#ifdef GL_POLYGON_OFFSET_EXT + { GL_POLYGON_OFFSET_BIAS_EXT ,"GL_POLYGON_OFFSET_BIAS_EXT" }, + { GL_POLYGON_OFFSET_EXT ,"GL_POLYGON_OFFSET_EXT" }, + { GL_POLYGON_OFFSET_FACTOR_EXT,"GL_POLYGON_OFFSET_FACTOR_EXT" }, +#endif + { GL_POLYGON_TOKEN ,"GL_POLYGON_TOKEN" }, + { GL_POSITION ,"GL_POSITION" }, + { GL_PROJECTION ,"GL_PROJECTION" }, + { GL_PROJECTION_MATRIX ,"GL_PROJECTION_MATRIX" }, + { GL_PROJECTION_STACK_DEPTH ,"GL_PROJECTION_STACK_DEPTH" }, + { GL_Q ,"GL_Q" }, + { GL_QUADRATIC_ATTENUATION ,"GL_QUADRATIC_ATTENUATION" }, + { GL_QUADS ,"GL_QUADS" }, + { GL_QUAD_STRIP ,"GL_QUAD_STRIP" }, + { GL_R ,"GL_R" }, + { GL_READ_BUFFER ,"GL_READ_BUFFER" }, + { GL_RED ,"GL_RED" }, + { GL_RED_BIAS ,"GL_RED_BIAS" }, + { GL_RED_BITS ,"GL_RED_BITS" }, + { GL_RED_SCALE ,"GL_RED_SCALE" }, + { GL_RENDER ,"GL_RENDER" }, + { GL_RENDERER ,"GL_RENDERER" }, + { GL_RENDER_MODE ,"GL_RENDER_MODE" }, + { GL_REPEAT ,"GL_REPEAT" }, + { GL_REPLACE ,"GL_REPLACE" }, +#ifdef GL_REPLACE_EXT + { GL_REPLACE_EXT ,"GL_REPLACE_EXT" }, +#endif + { GL_RETURN ,"GL_RETURN" }, + { GL_RGB ,"GL_RGB" }, + { GL_RGBA ,"GL_RGBA" }, + { GL_RGBA_MODE ,"GL_RGBA_MODE" }, + { GL_RIGHT ,"GL_RIGHT" }, + { GL_S ,"GL_S" }, + { GL_SCISSOR_BOX ,"GL_SCISSOR_BOX" }, + { GL_SCISSOR_TEST ,"GL_SCISSOR_TEST" }, + { GL_SELECT ,"GL_SELECT" }, + { GL_SET ,"GL_SET" }, + { GL_SHADE_MODEL ,"GL_SHADE_MODEL" }, + { GL_SHININESS ,"GL_SHININESS" }, + { GL_SHORT ,"GL_SHORT" }, + { GL_SMOOTH ,"GL_SMOOTH" }, + { GL_SPECULAR ,"GL_SPECULAR" }, + { GL_SPHERE_MAP ,"GL_SPHERE_MAP" }, + { GL_SPOT_CUTOFF ,"GL_SPOT_CUTOFF" }, + { GL_SPOT_DIRECTION ,"GL_SPOT_DIRECTION" }, + { GL_SPOT_EXPONENT ,"GL_SPOT_EXPONENT" }, + { GL_SRC_ALPHA ,"GL_SRC_ALPHA" }, + { GL_SRC_ALPHA_SATURATE ,"GL_SRC_ALPHA_SATURATE" }, + { GL_SRC_COLOR ,"GL_SRC_COLOR" }, + { GL_STACK_OVERFLOW ,"GL_STACK_OVERFLOW" }, + { GL_STACK_UNDERFLOW ,"GL_STACK_UNDERFLOW" }, + { GL_STENCIL ,"GL_STENCIL" }, + { GL_STENCIL_BITS ,"GL_STENCIL_BITS" }, + { GL_STENCIL_CLEAR_VALUE ,"GL_STENCIL_CLEAR_VALUE" }, + { GL_STENCIL_FAIL ,"GL_STENCIL_FAIL" }, + { GL_STENCIL_FUNC ,"GL_STENCIL_FUNC" }, + { GL_STENCIL_INDEX ,"GL_STENCIL_INDEX" }, + { GL_STENCIL_PASS_DEPTH_FAIL ,"GL_STENCIL_PASS_DEPTH_FAIL" }, + { GL_STENCIL_PASS_DEPTH_PASS ,"GL_STENCIL_PASS_DEPTH_PASS" }, + { GL_STENCIL_REF ,"GL_STENCIL_REF" }, + { GL_STENCIL_TEST ,"GL_STENCIL_TEST" }, + { GL_STENCIL_VALUE_MASK ,"GL_STENCIL_VALUE_MASK" }, + { GL_STENCIL_WRITEMASK ,"GL_STENCIL_WRITEMASK" }, + { GL_STEREO ,"GL_STEREO" }, + { GL_SUBPIXEL_BITS ,"GL_SUBPIXEL_BITS" }, + { GL_T ,"GL_T" }, + { GL_TEXTURE ,"GL_TEXTURE" }, + { GL_TEXTURE_1D ,"GL_TEXTURE_1D" }, + { GL_TEXTURE_2D ,"GL_TEXTURE_2D" }, + { GL_TEXTURE_BORDER ,"GL_TEXTURE_BORDER" }, + { GL_TEXTURE_BORDER_COLOR ,"GL_TEXTURE_BORDER_COLOR" }, + { GL_TEXTURE_COMPONENTS ,"GL_TEXTURE_COMPONENTS" }, +#ifdef GL_TEXTURE_COORD_ARRAY_EXT + { GL_TEXTURE_COORD_ARRAY_COUNT_EXT,"GL_TEXTURE_COORD_ARRAY_COUNT_EXT" }, + { GL_TEXTURE_COORD_ARRAY_EXT ,"GL_TEXTURE_COORD_ARRAY_EXT" }, + { GL_TEXTURE_COORD_ARRAY_POINTER_EXT,"GL_TEXTURE_COORD_ARRAY_POINTER_EXT" }, + { GL_TEXTURE_COORD_ARRAY_SIZE_EXT,"GL_TEXTURE_COORD_ARRAY_SIZE_EXT" }, + { GL_TEXTURE_COORD_ARRAY_STRIDE_EXT,"GL_TEXTURE_COORD_ARRAY_STRIDE_EXT" }, + { GL_TEXTURE_COORD_ARRAY_TYPE_EXT,"GL_TEXTURE_COORD_ARRAY_TYPE_EXT" }, +#endif + { GL_TEXTURE_ENV ,"GL_TEXTURE_ENV" }, + { GL_TEXTURE_ENV_COLOR ,"GL_TEXTURE_ENV_COLOR" }, + { GL_TEXTURE_ENV_MODE ,"GL_TEXTURE_ENV_MODE" }, + { GL_TEXTURE_GEN_MODE ,"GL_TEXTURE_GEN_MODE" }, + { GL_TEXTURE_GEN_Q ,"GL_TEXTURE_GEN_Q" }, + { GL_TEXTURE_GEN_R ,"GL_TEXTURE_GEN_R" }, + { GL_TEXTURE_GEN_S ,"GL_TEXTURE_GEN_S" }, + { GL_TEXTURE_GEN_T ,"GL_TEXTURE_GEN_T" }, + { GL_TEXTURE_HEIGHT ,"GL_TEXTURE_HEIGHT" }, + { GL_TEXTURE_MAG_FILTER ,"GL_TEXTURE_MAG_FILTER" }, + { GL_TEXTURE_MATRIX ,"GL_TEXTURE_MATRIX" }, + { GL_TEXTURE_MIN_FILTER ,"GL_TEXTURE_MIN_FILTER" }, + { GL_TEXTURE_STACK_DEPTH ,"GL_TEXTURE_STACK_DEPTH" }, + { GL_TEXTURE_WIDTH ,"GL_TEXTURE_WIDTH" }, + { GL_TEXTURE_WRAP_S ,"GL_TEXTURE_WRAP_S" }, + { GL_TEXTURE_WRAP_T ,"GL_TEXTURE_WRAP_T" }, + { GL_TRIANGLES ,"GL_TRIANGLES" }, + { GL_TRIANGLE_FAN ,"GL_TRIANGLE_FAN" }, + { GL_TRIANGLE_STRIP ,"GL_TRIANGLE_STRIP" }, + { GL_UNPACK_ALIGNMENT ,"GL_UNPACK_ALIGNMENT" }, + { GL_UNPACK_LSB_FIRST ,"GL_UNPACK_LSB_FIRST" }, + { GL_UNPACK_ROW_LENGTH ,"GL_UNPACK_ROW_LENGTH" }, + { GL_UNPACK_SKIP_PIXELS ,"GL_UNPACK_SKIP_PIXELS" }, + { GL_UNPACK_SKIP_ROWS ,"GL_UNPACK_SKIP_ROWS" }, + { GL_UNPACK_SWAP_BYTES ,"GL_UNPACK_SWAP_BYTES" }, + { GL_UNSIGNED_BYTE ,"GL_UNSIGNED_BYTE" }, + { GL_UNSIGNED_INT ,"GL_UNSIGNED_INT" }, + { GL_UNSIGNED_SHORT ,"GL_UNSIGNED_SHORT" }, + { GL_VENDOR ,"GL_VENDOR" }, + { GL_VERSION ,"GL_VERSION" }, +#ifdef GL_VERTEX_ARRAY_EXT + { GL_VERTEX_ARRAY_COUNT_EXT ,"GL_VERTEX_ARRAY_COUNT_EXT" }, + { GL_VERTEX_ARRAY_EXT ,"GL_VERTEX_ARRAY_EXT" }, + { GL_VERTEX_ARRAY_POINTER_EXT ,"GL_VERTEX_ARRAY_POINTER_EXT" }, + { GL_VERTEX_ARRAY_SIZE_EXT ,"GL_VERTEX_ARRAY_SIZE_EXT" }, + { GL_VERTEX_ARRAY_STRIDE_EXT ,"GL_VERTEX_ARRAY_STRIDE_EXT" }, + { GL_VERTEX_ARRAY_TYPE_EXT ,"GL_VERTEX_ARRAY_TYPE_EXT" }, +#endif + { GL_VIEWPORT ,"GL_VIEWPORT" }, + { GL_XOR ,"GL_XOR" }, + { GL_ZOOM_X ,"GL_ZOOM_X" }, + { GL_ZOOM_Y ,"GL_ZOOM_Y" }, + + /* Magic end-marker - do not remove! */ + { GL_ZERO, NULL } +} ; + + +int xglTraceIsEnabled ( char *gl_function_name ) +{ + static int frameno = 0 ; + static int countdown = 0 ; + + if ( strcmp ( gl_function_name, "glutSwapBuffers" ) == 0 ) + { + if ( countdown == 0 ) + { + char s [ 100 ] ; + + fprintf ( stderr, "\nContinue Tracing after frame %d [Yes,No,Countdown,eXit] ?", ++frameno ) ; + gets ( s ) ; + + if ( s[0] == 'x' ) + exit ( 1 ) ; + + xglTraceOn = ( s[0] != 'n' && s[0] != 'c' ) ; + + if ( s[0] == 'c' ) + { + fprintf ( stderr, "\nHow many frames should I wait until I ask again?" ) ; + gets ( s ) ; + countdown = atoi(s) ; + } + + fprintf ( xglTraceFd, "/* Frame %d - tracing %s */\n", frameno, xglTraceOn ? "ON" : "OFF" ) ; + } + else + countdown-- ; + } + + return xglTraceOn ; +} + + +int xglExecuteIsEnabled ( char *gl_function_name ) +{ + return TRUE ; +} + +char *xglExpandGLenum ( GLenum x ) +{ + static GLenum last_val = GL_NONE ; + static char *last_str = NULL ; + char *error_message; + int i; + + /* Due to ambiguity - these are output as numbers... + + GL_NONE = , GL_ZERO = GL_FALSE = GL_POINTS = 0 + GL_ONE = , GL_TRUE = GL_LINES = 1 + */ + + if ( (int) x == 0 ) return "(GLenum) 0" ; + if ( (int) x == 1 ) return "(GLenum) 1" ; + + if ( last_val == x ) return last_str ; + + for ( i = 0 ; glenum_string [i].name != NULL ; i++ ) + if ( glenum_string [i].val == x ) + return glenum_string [i].name ; + + /* + WARNING - this will leak memory - but it is an error condition, + so I suppose it's acceptable. + You can't declare the 'error_message' string as a + static - or else double errors will go mis-reported. + */ + + error_message = (char *)malloc( 100 * sizeof(char) ) ; + + sprintf ( error_message, "(GLenum) 0x%04x /* Illegal? */", (int) x ) ; + + return error_message ; +} + +static GLbyte b1 [ 1 ], b2 [ 2 ], b3 [ 3 ], b4 [ 4 ] ; +static GLdouble d1 [ 1 ], d2 [ 2 ], d3 [ 3 ], d4 [ 4 ] ; +static GLfloat f1 [ 1 ], f2 [ 2 ], f3 [ 3 ], f4 [ 4 ] ; +static GLint i1 [ 1 ], i2 [ 2 ], i3 [ 3 ], i4 [ 4 ] ; +static GLshort s1 [ 1 ], s2 [ 2 ], s3 [ 3 ], s4 [ 4 ] ; +static GLubyte ub1 [ 1 ], ub2 [ 2 ], ub3 [ 3 ], ub4 [ 4 ] ; +static GLuint ui1 [ 1 ], ui2 [ 2 ], ui3 [ 3 ], ui4 [ 4 ] ; +static GLushort us1 [ 1 ], us2 [ 2 ], us3 [ 3 ], us4 [ 4 ] ; + +static GLdouble md [ 16 ] ; +static GLfloat mf [ 16 ] ; + +GLdouble *xglBuild1dv ( GLdouble v ) { d1[0] = v ; return d1 ; } +GLfloat *xglBuild1fv ( GLfloat v ) { f1[0] = v ; return f1 ; } +GLbyte *xglBuild1bv ( GLbyte v ) { b1[0] = v ; return b1 ; } +GLint *xglBuild1iv ( GLint v ) { i1[0] = v ; return i1 ; } +GLshort *xglBuild1sv ( GLshort v ) { s1[0] = v ; return s1 ; } +GLubyte *xglBuild1ubv ( GLubyte v ) { ub1[0] = v ; return ub1 ; } +GLuint *xglBuild1uiv ( GLuint v ) { ui1[0] = v ; return ui1 ; } +GLushort *xglBuild1usv ( GLushort v ) { us1[0] = v ; return us1 ; } + +GLdouble *xglBuild2dv ( GLdouble v0, GLdouble v1 ) { d2[0] = v0 ; d2[1] = v1 ; return d2 ; } +GLfloat *xglBuild2fv ( GLfloat v0, GLfloat v1 ) { f2[0] = v0 ; f2[1] = v1 ; return f2 ; } +GLbyte *xglBuild2bv ( GLbyte v0, GLbyte v1 ) { b2[0] = v0 ; b2[1] = v1 ; return b2 ; } +GLint *xglBuild2iv ( GLint v0, GLint v1 ) { i2[0] = v0 ; i2[1] = v1 ; return i2 ; } +GLshort *xglBuild2sv ( GLshort v0, GLshort v1 ) { s2[0] = v0 ; s2[1] = v1 ; return s2 ; } +GLubyte *xglBuild2ubv ( GLubyte v0, GLubyte v1 ) { ub2[0] = v0 ; ub2[1] = v1 ; return ub2 ; } +GLuint *xglBuild2uiv ( GLuint v0, GLuint v1 ) { ui2[0] = v0 ; ui2[1] = v1 ; return ui2 ; } +GLushort *xglBuild2usv ( GLushort v0, GLushort v1 ) { us2[0] = v0 ; us2[1] = v1 ; return us2 ; } + +GLdouble *xglBuild3dv ( GLdouble v0, GLdouble v1, GLdouble v2 ) { d3[0] = v0 ; d3[1] = v1 ; d3[2] = v2 ; return d3 ; } +GLfloat *xglBuild3fv ( GLfloat v0, GLfloat v1, GLfloat v2 ) { f3[0] = v0 ; f3[1] = v1 ; f3[2] = v2 ; return f3 ; } +GLbyte *xglBuild3bv ( GLbyte v0, GLbyte v1, GLbyte v2 ) { b3[0] = v0 ; b3[1] = v1 ; b3[2] = v2 ; return b3 ; } +GLint *xglBuild3iv ( GLint v0, GLint v1, GLint v2 ) { i3[0] = v0 ; i3[1] = v1 ; i3[2] = v2 ; return i3 ; } +GLshort *xglBuild3sv ( GLshort v0, GLshort v1, GLshort v2 ) { s3[0] = v0 ; s3[1] = v1 ; s3[2] = v2 ; return s3 ; } +GLubyte *xglBuild3ubv ( GLubyte v0, GLubyte v1, GLubyte v2 ) { ub3[0] = v0 ; ub3[1] = v1 ; ub3[2] = v2 ; return ub3 ; } +GLuint *xglBuild3uiv ( GLuint v0, GLuint v1, GLuint v2 ) { ui3[0] = v0 ; ui3[1] = v1 ; ui3[2] = v2 ; return ui3 ; } +GLushort *xglBuild3usv ( GLushort v0, GLushort v1, GLushort v2 ) { us3[0] = v0 ; us3[1] = v1 ; us3[2] = v2 ; return us3 ; } + + +GLdouble *xglBuild4dv ( GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3 ) { d4[0] = v0 ; d4[1] = v1 ; d4[2] = v2 ; d4[3] = v3 ; return d4 ; } +GLfloat *xglBuild4fv ( GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { f4[0] = v0 ; f4[1] = v1 ; f4[2] = v2 ; f4[3] = v3 ; return f4 ; } +GLbyte *xglBuild4bv ( GLbyte v0, GLbyte v1, GLbyte v2, GLbyte v3 ) { b4[0] = v0 ; b4[1] = v1 ; b4[2] = v2 ; b4[3] = v3 ; return b4 ; } +GLint *xglBuild4iv ( GLint v0, GLint v1, GLint v2, GLint v3 ) { i4[0] = v0 ; i4[1] = v1 ; i4[2] = v2 ; i4[3] = v3 ; return i4 ; } +GLshort *xglBuild4sv ( GLshort v0, GLshort v1, GLshort v2, GLshort v3 ) { s4[0] = v0 ; s4[1] = v1 ; s4[2] = v2 ; s4[3] = v3 ; return s4 ; } +GLubyte *xglBuild4ubv ( GLubyte v0, GLubyte v1, GLubyte v2, GLubyte v3 ) { ub4[0] = v0 ; ub4[1] = v1 ; ub4[2] = v2 ; ub4[3] = v3 ; return ub4 ; } +GLuint *xglBuild4uiv ( GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) { ui4[0] = v0 ; ui4[1] = v1 ; ui4[2] = v2 ; ui4[3] = v3 ; return ui4 ; } +GLushort *xglBuild4usv ( GLushort v0, GLushort v1, GLushort v2, GLushort v3 ) { us4[0] = v0 ; us4[1] = v1 ; us4[2] = v2 ; us4[3] = v3 ; return us4 ; } + +GLdouble *xglBuildMatrixd ( GLdouble m0 , GLdouble m1 , GLdouble m2 , GLdouble m3 , + GLdouble m4 , GLdouble m5 , GLdouble m6 , GLdouble m7 , + GLdouble m8 , GLdouble m9 , GLdouble m10, GLdouble m11, + GLdouble m12, GLdouble m13, GLdouble m14, GLdouble m15 ) +{ + md[ 0] = m0 ; md[ 1] = m1 ; md[ 2] = m2 ; md[ 3] = m3 ; + md[ 4] = m4 ; md[ 5] = m5 ; md[ 6] = m6 ; md[ 7] = m7 ; + md[ 8] = m8 ; md[ 9] = m9 ; md[10] = m10 ; md[11] = m11 ; + md[12] = m12 ; md[13] = m13 ; md[14] = m14 ; md[15] = m15 ; + + return md ; +} + + +GLfloat *xglBuildMatrixf ( GLfloat m0 , GLfloat m1 , GLfloat m2 , GLfloat m3 , + GLfloat m4 , GLfloat m5 , GLfloat m6 , GLfloat m7 , + GLfloat m8 , GLfloat m9 , GLfloat m10, GLfloat m11, + GLfloat m12, GLfloat m13, GLfloat m14, GLfloat m15 ) +{ + mf[ 0] = m0 ; mf[ 1] = m1 ; mf[ 2] = m2 ; mf[ 3] = m3 ; + mf[ 4] = m4 ; mf[ 5] = m5 ; mf[ 6] = m6 ; mf[ 7] = m7 ; + mf[ 8] = m8 ; mf[ 9] = m9 ; mf[10] = m10 ; mf[11] = m11 ; + mf[12] = m12 ; mf[13] = m13 ; mf[14] = m14 ; mf[15] = m15 ; + + return mf ; +} +