ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

SWvertex Struct Reference

Data-structure to handle vertices in the software rasterizer. More...

#include <swrast.h>

Data Fields

GLfloat attrib [FRAG_ATTRIB_MAX][4]
GLchan color [4]
GLfloat pointSize

Detailed Description

Data-structure to handle vertices in the software rasterizer.

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:

  • Register the rastersetup and triangle functions from utils/software_helper.
  • On statechange, update the rasterization pointers in that module.

Rasterization hardware drivers:

  • Keep native rastersetup.
  • Implement native twoside,offset and unfilled triangle setup.
  • Implement a translator from native vertices to swrast vertices.
  • On partial fallback (mix of accelerated and unaccelerated prims), call a pass-through function which translates native vertices to SWvertices and calls the appropriate swrast function.
  • On total fallback (vertex format insufficient for state or all primitives unaccelerated), hook in swrast_setup instead.

Definition at line 71 of file swrast.h.


The documentation for this struct was generated from the following file:
  • dll/3rdparty/mesa32/src/swrast/swrast.h

Generated on Sun May 27 2012 06:44:27 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.