OSDN Git Service

Make the transition to script-genereated GLX code easier.
authorIan Romanick <idr@us.ibm.com>
Wed, 1 Dec 2004 08:15:01 +0000 (08:15 +0000)
committerIan Romanick <idr@us.ibm.com>
Wed, 1 Dec 2004 08:15:01 +0000 (08:15 +0000)
Move EXT_vertex_array wrapper functions from indirect_init.c to vertarr.c.
Fix problems with EXT_multi_draw_arrays function names.

src/glx/x11/indirect.h
src/glx/x11/indirect_init.c
src/glx/x11/vertarr.c

index e0a2dba..5b39b74 100644 (file)
@@ -563,8 +563,8 @@ void __indirect_glWindowPos3dvARB(const GLdouble * p);
 void __indirect_glWindowPos3ivARB(const GLint * p);
 void __indirect_glWindowPos3svARB(const GLshort * p);
 
-void __indirect_glMultiDrawArrays(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-void __indirect_glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const GLvoid ** indices, GLsizei primcount);
+void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid ** indices, GLsizei primcount);
 
 void __indirect_glSampleMaskSGIS( GLfloat value, GLboolean invert );
 void __indirect_glSamplePatternSGIS( GLenum pass );
@@ -595,6 +595,19 @@ void __indirect_glCompressedTexSubImage3DARB( GLenum target, GLint level,
     GLsizei width, GLsizei height, GLsizei depth,
     GLenum format, GLsizei image_size, const GLvoid *data );
 
+void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride,
+    GLsizei count, const GLvoid * pointer );
+void __indirect_glEdgeFlagPointerEXT(GLsizei stride,
+    GLsizei count, const GLboolean * pointer );
+void __indirect_glIndexPointerEXT(GLenum type, GLsizei stride,
+    GLsizei count, const GLvoid * pointer );
+void __indirect_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
+    const GLvoid * pointer );
+void __indirect_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
+    GLsizei count, const GLvoid * pointer );
+void __indirect_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride,
+    GLsizei count, const GLvoid * pointer );
+
 /* 145. GL_EXT_secondary_color / GL 1.4 */
 
 void __indirect_glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
index c3ec8d0..d587a87 100644 (file)
@@ -45,53 +45,6 @@ static int NoOp(void)
     return 0;
 }
 
-/**
- * \name Vertex array pointer bridge functions
- *
- * When EXT_vertex_array was moved into the core GL spec, the \c count
- * parameter was lost.  This libGL really only wants to implement the GL 1.1
- * version, but we need to support applications that were written to the old
- * interface.  These bridge functions are part of the glue that makes this
- * happen.
- */
-/*@{*/
-static void ColorPointerEXT(GLint size, GLenum type, GLsizei stride,
-                           GLsizei count, const GLvoid * pointer )
-{
-    (void) count; __indirect_glColorPointer( size, type, stride, pointer );
-}
-
-static void EdgeFlagPointerEXT(GLsizei stride,
-                              GLsizei count, const GLboolean * pointer )
-{
-    (void) count; __indirect_glEdgeFlagPointer( stride, pointer );
-}
-
-static void IndexPointerEXT(GLenum type, GLsizei stride,
-                           GLsizei count, const GLvoid * pointer )
-{
-    (void) count; __indirect_glIndexPointer( type, stride, pointer );
-}
-
-static void NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
-                            const GLvoid * pointer )
-{
-    (void) count; __indirect_glNormalPointer( type, stride, pointer );
-}
-
-static void TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
-                              GLsizei count, const GLvoid * pointer )
-{
-    (void) count; __indirect_glTexCoordPointer( size, type, stride, pointer );
-}
-
-static void VertexPointerEXT(GLint size, GLenum type, GLsizei stride,
-                           GLsizei count, const GLvoid * pointer )
-{
-    (void) count; __indirect_glVertexPointer( size, type, stride, pointer );
-}
-/*@}*/
-
 
 __GLapi *__glXNewIndirectAPI(void)
 {
@@ -492,8 +445,8 @@ __GLapi *__glXNewIndirectAPI(void)
     glAPI->SeparableFilter2D = __indirect_glSeparableFilter2D;
 
     /* 1.4 */
-    glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArrays;
-    glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElements;
+    glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
+    glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
 
     /* ARB 1. GL_ARB_multitexture */
     glAPI->ActiveTextureARB = __indirect_glActiveTextureARB;
@@ -577,12 +530,12 @@ __GLapi *__glXNewIndirectAPI(void)
     glAPI->SamplePatternSGIS = __indirect_glSamplePatternSGIS;
 
     /* 30. GL_EXT_vertex_array */
-    glAPI->ColorPointerEXT    = ColorPointerEXT;
-    glAPI->EdgeFlagPointerEXT = EdgeFlagPointerEXT;
-    glAPI->IndexPointerEXT    = IndexPointerEXT;
-    glAPI->NormalPointerEXT   = NormalPointerEXT;
-    glAPI->TexCoordPointerEXT = TexCoordPointerEXT;
-    glAPI->VertexPointerEXT   = VertexPointerEXT;
+    glAPI->ColorPointerEXT    = __indirect_glColorPointerEXT;
+    glAPI->EdgeFlagPointerEXT = __indirect_glEdgeFlagPointerEXT;
+    glAPI->IndexPointerEXT    = __indirect_glIndexPointerEXT;
+    glAPI->NormalPointerEXT   = __indirect_glNormalPointerEXT;
+    glAPI->TexCoordPointerEXT = __indirect_glTexCoordPointerEXT;
+    glAPI->VertexPointerEXT   = __indirect_glVertexPointerEXT;
 
     /* 145. GL_EXT_secondary_color / GL 1.4 */
     glAPI->SecondaryColor3bEXT       = __indirect_glSecondaryColor3bEXT;
index 6d0e5f4..5da30a3 100644 (file)
@@ -165,6 +165,55 @@ void __glXInitVertexArrayState(__GLXcontext *gc)
 
 /*****************************************************************************/
 
+/**
+ * \name Vertex array pointer bridge functions
+ *
+ * When EXT_vertex_array was moved into the core GL spec, the \c count
+ * parameter was lost.  This libGL really only wants to implement the GL 1.1
+ * version, but we need to support applications that were written to the old
+ * interface.  These bridge functions are part of the glue that makes this
+ * happen.
+ */
+/*@{*/
+void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride,
+                           GLsizei count, const GLvoid * pointer )
+{
+    (void) count; __indirect_glColorPointer( size, type, stride, pointer );
+}
+
+void __indirect_glEdgeFlagPointerEXT(GLsizei stride,
+                              GLsizei count, const GLboolean * pointer )
+{
+    (void) count; __indirect_glEdgeFlagPointer( stride, pointer );
+}
+
+void __indirect_glIndexPointerEXT(GLenum type, GLsizei stride,
+                           GLsizei count, const GLvoid * pointer )
+{
+    (void) count; __indirect_glIndexPointer( type, stride, pointer );
+}
+
+void __indirect_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count,
+                            const GLvoid * pointer )
+{
+    (void) count; __indirect_glNormalPointer( type, stride, pointer );
+}
+
+void __indirect_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride,
+                              GLsizei count, const GLvoid * pointer )
+{
+    (void) count; __indirect_glTexCoordPointer( size, type, stride, pointer );
+}
+
+void __indirect_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride,
+                           GLsizei count, const GLvoid * pointer )
+{
+    (void) count; __indirect_glVertexPointer( size, type, stride, pointer );
+}
+/*@}*/
+
+/*****************************************************************************/
+
 void __indirect_glVertexPointer(GLint size, GLenum type, GLsizei stride,
                     const GLvoid *pointer)
 {