mesa: initial support for fixed-pt vertex arrays
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 20 Jun 2008 17:32:22 +0000 (11:32 -0600)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 22 Sep 2008 05:13:55 +0000 (22:13 -0700)
src/mesa/main/glheader.h
src/mesa/main/mfeatures.h
src/mesa/main/varray.c

index 602d6f56940ab9a63f4027dd63a89c7e0927e400..e155f5eb9f38cb0f8ca49427e2108248fd797a7d 100644 (file)
 #include "GL/glext.h"
 
 
+#ifndef GL_FIXED
+#define GL_FIXED 0x140C
+#endif
+
+
 #if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP)
 #define CAPI _cdecl
 #endif
index 4e384b0b3be9dac91937479b41409a963ce598d6..6563bdd19f6c9c5801a98659a9d6f6adfadc3b1c 100644 (file)
@@ -46,6 +46,7 @@
 #define FEATURE_drawpix  _HAVE_FULL_GL
 #define FEATURE_evaluators  _HAVE_FULL_GL
 #define FEATURE_feedback  _HAVE_FULL_GL
+#define FEATURE_fixedpt 0
 #define FEATURE_histogram  _HAVE_FULL_GL
 #define FEATURE_pixel_transfer  _HAVE_FULL_GL
 #define FEATURE_texgen  _HAVE_FULL_GL
index 67dd093f2a6ae500b9bc6f896fdb412b50fba019..c27f1aa7b8c9102aab5b3e81e4e53cfccea9ca85 100644 (file)
@@ -116,6 +116,11 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
       case GL_DOUBLE:
          elementSize = size * sizeof(GLdouble);
          break;
+#if FEATURE_fixedpt
+      case GL_FIXED:
+         elementSize = size * sizeof(GLfixed);
+         break;
+#endif
       default:
          _mesa_error( ctx, GL_INVALID_ENUM, "glVertexPointer(type)" );
          return;
@@ -161,6 +166,11 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
       case GL_DOUBLE:
          elementSize = 3 * sizeof(GLdouble);
          break;
+#if FEATURE_fixedpt
+      case GL_FIXED:
+         elementSize = 3 * sizeof(GLfixed);
+         break;
+#endif
       default:
          _mesa_error( ctx, GL_INVALID_ENUM, "glNormalPointer(type)" );
          return;
@@ -219,6 +229,11 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
       case GL_DOUBLE:
          elementSize = size * sizeof(GLdouble);
          break;
+#if FEATURE_fixedpt
+      case GL_FIXED:
+         elementSize = size * sizeof(GLfixed);
+         break;
+#endif
       default:
          _mesa_error( ctx, GL_INVALID_ENUM, "glColorPointer(type)" );
          return;
@@ -400,6 +415,11 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
       case GL_DOUBLE:
          elementSize = size * sizeof(GLdouble);
          break;
+#if FEATURE_fixedpt
+      case GL_FIXED:
+         elementSize = size * sizeof(GLfixed);
+         break;
+#endif
       default:
          _mesa_error( ctx, GL_INVALID_ENUM, "glTexCoordPointer(type)" );
          return;