summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/swrast.h
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2007-07-04 10:52:35 +0800
committerZou Nan hai <nanhai.zou@intel.com>2007-07-04 10:52:35 +0800
commitfb9ee9b323bff93973a39560b2bc007aace4bddd (patch)
tree05e1e72e8f4d321cde2c48b8518e6d9736c680dd /src/mesa/swrast/swrast.h
parent285b326c606e9b2f90e4fe177b15b3fa23239b86 (diff)
parent7ff4359a3be1278b26950f96ab23014a667af838 (diff)
Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa into 965-glsl
Diffstat (limited to 'src/mesa/swrast/swrast.h')
-rw-r--r--src/mesa/swrast/swrast.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 9e1fe24bb4..d101a9e2ae 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -45,6 +45,14 @@
* improve its usefulness as a fallback mechanism for hardware
* drivers.
*
+ * wpos = attr[FRAG_ATTRIB_WPOS] and MUST BE THE FIRST values in the
+ * vertex because of the tnl clipping code.
+
+ * wpos[0] and [1] are the screen-coords of SWvertex.
+ * wpos[2] is the z-buffer coord (if 16-bit Z buffer, in range [0,65535]).
+ * wpos[3] is 1/w where w is the clip-space W coord. This is the value
+ * that clip{XYZ} were multiplied by to get ndc{XYZ}.
+ *
* Full software drivers:
* - Register the rastersetup and triangle functions from
* utils/software_helper.
@@ -61,21 +69,15 @@
* primitives unaccelerated), hook in swrast_setup instead.
*/
typedef struct {
- /** win[0], win[1] are the screen-coords of SWvertex.
- * win[2] is the z-buffer coord (if 16-bit Z buffer, in range [0,65535]).
- * win[3] is 1/w where w is the clip-space W coord. This is the value
- * that clip{XYZ} were multiplied by to get ndc{XYZ}.
- */
- GLfloat win[4];
- GLchan color[4];
- GLchan specular[4];
- GLfloat fog;
- GLfloat index;
+ GLfloat attrib[FRAG_ATTRIB_MAX][4];
+ GLchan color[4]; /** integer color */
GLfloat pointSize;
- GLfloat attrib[FRAG_ATTRIB_MAX][4]; /**< texcoords & varying, more to come */
} SWvertex;
+#define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0
+
+
struct swrast_device_driver;