Initial templates for immediate mode fastpaths, or custom tnl modules.
authorGareth Hughes <gareth@valinux.com>
Tue, 13 Mar 2001 17:39:56 +0000 (17:39 +0000)
committerGareth Hughes <gareth@valinux.com>
Tue, 13 Mar 2001 17:39:56 +0000 (17:39 +0000)
Completely untested and incomplete.  More to follow.

src/mesa/drivers/common/t_dd_tritmp.h
src/mesa/drivers/common/t_dd_vertex.h

index 2a98b9fedf2c8457388089c0a81df9c3438aabc0..6e07d902a6e64972d982584b3b12985ff98c5572 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_dd_tritmp.h,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
+/* $Id: t_dd_tritmp.h,v 1.7 2001/03/13 17:39:56 gareth Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -48,8 +48,8 @@ Brian Paul   All Rights Reserved.
  * HAVE_SPEC: Vertices have secondary rgba values.
  *
  * VERT_X(v): Alias for vertex x value.
- * VERT_Y(v): Alias for vertex x value.
- * VERT_Z(v): Alias for vertex x value.
+ * VERT_Y(v): Alias for vertex y value.
+ * VERT_Z(v): Alias for vertex z value.
  * DEPTH_SCALE: Scale for offset.
  *
  * VERTEX: Hardware vertex type.
index 10a06ff2212e1db92598480de38543d70382789e..99465b6d969ad58abec82e71bda46d199dff1f9f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_dd_vertex.h,v 1.5 2001/03/12 00:48:44 gareth Exp $ */
+/* $Id: t_dd_vertex.h,v 1.6 2001/03/13 17:39:56 gareth Exp $ */
 
 /*
  * Mesa 3-D graphics library
  *    Keith Whitwell <keithw@valinux.com>
  */
 
+typedef struct {
+   GLfloat x, y, z, w;
+} TAG(_coord);
+
 #ifdef COLOR_IS_RGBA
 typedef struct {
    GLubyte red;
    GLubyte green;
    GLubyte blue;
    GLubyte alpha;
-} TAG(_color);
+} TAG(_color_t);
 #else
 typedef struct {
    GLubyte blue;
    GLubyte green;
    GLubyte red;
    GLubyte alpha;
-} TAG(_color);
+} TAG(_color_t);
 #endif
 
 typedef union {
    struct {
       GLfloat x, y, z, w;
-      TAG(_color) color;
-      TAG(_color) specular;
+      TAG(_color_t) color;
+      TAG(_color_t) specular;
       GLfloat u0, v0;
       GLfloat u1, v1;
       GLfloat u2, v2;
@@ -55,8 +59,8 @@ typedef union {
    } v;
    struct {
       GLfloat x, y, z, w;
-      TAG(_color) color;
-      TAG(_color) specular;
+      TAG(_color_t) color;
+      TAG(_color_t) specular;
       GLfloat u0, v0, q0;
       GLfloat u1, v1, q1;
       GLfloat u2, v2, q2;
@@ -64,9 +68,27 @@ typedef union {
    } pv;
    struct {
       GLfloat x, y, z;
-      TAG(_color) color;
+      TAG(_color_t) color;
    } tv;
    GLfloat f[24];
    GLuint  ui[24];
    GLubyte ub4[24][4];
 } TAG(Vertex), *TAG(VertexPtr);
+
+typedef struct {
+   TAG(_coord_t) obj;
+   TAG(_coord_t) normal;
+
+   TAG(_coord_t) clip;
+   GLuint mask;
+
+   TAG(_color_t) color;
+   TAG(_color_t) specular;
+   GLuint __padding0;
+
+   TAG(_coord_t) win;
+   TAG(_coord_t) eye;
+
+   TAG(_coord_t) texture[MAX_TEXTURE_UNITS];
+   GLuint __padding1[8]; /* FIXME: This is kinda evil... */
+} TAG(TnlVertex), *TAG(TnlVertexPtr);