#include <swrast.h>
The software rasterizer now uses this format for vertices. Thus a 'RasterSetup' stage or other translation is required between the tnl module and the swrast rasterization functions. This serves to isolate the swrast module from the internals of the tnl module, and 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:
Rasterization hardware drivers:
Data Fields | |
GLfloat | attrib [FRAG_ATTRIB_MAX][4] |
GLchan | color [4] |
GLfloat | pointSize |
integer color |
GLfloat SWvertex::attrib[FRAG_ATTRIB_MAX][4] |
GLchan SWvertex::color[4] |
GLfloat SWvertex::pointSize |
integer color