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)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 20 Jun 2008 17:32:22 +0000 (11:32 -0600)
src/mesa/main/glheader.h
src/mesa/main/mfeatures.h
src/mesa/main/varray.c

index fd4127558a839e4d53bd550e971decc0a994798e..0f74bc83ccc2e2a625088f75f58a4688407277e5 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 6a71954648dde2332bed841619f5e150f13bf661..13397e97ba61d0e68749c98cca071517325c518a 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 fe4a7c684f6344bd84aa8cb94324de71e3953419..9474724c33a3e47fdd013ddd34ba932129a7cacd 100644 (file)
@@ -121,6 +121,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;
@@ -166,6 +171,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;
@@ -224,6 +234,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;
@@ -405,6 +420,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;