core  array_cache  math  swrast  swrast_setup  tnl  tnl_dd 
Main Page   Data Structures   File List   Data Fields   Globals  

t_vb_render.c File Reference

#include "glheader.h"
#include "context.h"
#include "enums.h"
#include "macros.h"
#include "imports.h"
#include "mtypes.h"
#include "nvfragprog.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
#include "t_pipeline.h"
#include "t_vb_cliptmp.h"
#include "t_vb_rendertmp.h"

Defines

#define W(i)   coord[i][3]
#define Z(i)   coord[i][2]
#define Y(i)   coord[i][1]
#define X(i)   coord[i][0]
#define SIZE   4
#define TAG(x)   x##_4
#define NEED_EDGEFLAG_SETUP   (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL)
#define EDGEFLAG_GET(idx)   VB->EdgeFlag[idx]
#define EDGEFLAG_SET(idx, val)   VB->EdgeFlag[idx] = val
#define CLIPMASK   (CLIP_ALL_BITS|CLIP_CULL_BIT)
#define RENDER_POINTS(start, count)   tnl->Driver.Render.Points( ctx, start, count )
#define RENDER_LINE(v1, v2)
#define RENDER_TRI(v1, v2, v3)
#define RENDER_QUAD(v1, v2, v3, v4)
#define LOCAL_VARS
#define TAG(x)   clip_##x##_verts
#define INIT(x)   tnl->Driver.Render.PrimitiveNotify( ctx, x )
#define RESET_STIPPLE   if (stipple) tnl->Driver.Render.ResetLineStipple( ctx )
#define RESET_OCCLUSION   ctx->OcclusionResult = GL_TRUE
#define PRESERVE_VB_DEFS
#define ELT(x)   elt[x]
#define TAG(x)   clip_##x##_elts
#define NEED_EDGEFLAG_SETUP   (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL)
#define EDGEFLAG_GET(idx)   VB->EdgeFlag[idx]
#define EDGEFLAG_SET(idx, val)   VB->EdgeFlag[idx] = val
#define RENDER_POINTS(start, count)   tnl->Driver.Render.Points( ctx, start, count )
#define RENDER_LINE(v1, v2)   LineFunc( ctx, v1, v2 )
#define RENDER_TRI(v1, v2, v3)   TriangleFunc( ctx, v1, v2, v3 )
#define RENDER_QUAD(v1, v2, v3, v4)   QuadFunc( ctx, v1, v2, v3, v4 )
#define TAG(x)   _tnl_##x##_verts
#define LOCAL_VARS
#define RESET_STIPPLE   if (stipple) tnl->Driver.Render.ResetLineStipple( ctx )
#define RESET_OCCLUSION   ctx->OcclusionResult = GL_TRUE
#define INIT(x)   tnl->Driver.Render.PrimitiveNotify( ctx, x )
#define RENDER_TAB_QUALIFIER
#define PRESERVE_VB_DEFS
#define TAG(x)   _tnl_##x##_elts
#define ELT(x)   elt[x]

Functions

void clip_elt_triangles (GLcontext *ctx, GLuint start, GLuint count, GLuint flags)
void _tnl_RenderClippedPolygon (GLcontext *ctx, const GLuint *elts, GLuint n)
void _tnl_RenderClippedLine (GLcontext *ctx, GLuint ii, GLuint jj)
GLboolean run_render (GLcontext *ctx, struct tnl_pipeline_stage *stage)
void check_render (GLcontext *ctx, struct tnl_pipeline_stage *stage)
void dtr (struct tnl_pipeline_stage *stage)

Variables

const struct tnl_pipeline_stage _tnl_render_stage

Define Documentation

#define CLIPMASK   (CLIP_ALL_BITS|CLIP_CULL_BIT)
 

#define EDGEFLAG_GET idx       VB->EdgeFlag[idx]
 

#define EDGEFLAG_GET idx       VB->EdgeFlag[idx]
 

#define EDGEFLAG_SET idx,
val       VB->EdgeFlag[idx] = val
 

#define EDGEFLAG_SET idx,
val       VB->EdgeFlag[idx] = val
 

#define ELT      elt[x]
 

#define ELT      elt[x]
 

#define INIT      tnl->Driver.Render.PrimitiveNotify( ctx, x )
 

#define INIT      tnl->Driver.Render.PrimitiveNotify( ctx, x )
 

#define LOCAL_VARS
 

Value:

TNLcontext *tnl = TNL_CONTEXT(ctx);                             \
   struct vertex_buffer *VB = &tnl->vb;                         \
   const GLuint * const elt = VB->Elts;                         \
   const line_func LineFunc = tnl->Driver.Render.Line;          \
   const triangle_func TriangleFunc = tnl->Driver.Render.Triangle;      \
   const quad_func QuadFunc = tnl->Driver.Render.Quad;          \
   const GLboolean stipple = ctx->Line.StippleFlag;             \
   (void) (LineFunc && TriangleFunc && QuadFunc);               \
   (void) elt; (void) stipple

#define LOCAL_VARS
 

Value:

TNLcontext *tnl = TNL_CONTEXT(ctx);                             \
   struct vertex_buffer *VB = &tnl->vb;                         \
   const GLuint * const elt = VB->Elts;                         \
   const GLubyte *mask = VB->ClipMask;                          \
   const GLuint sz = VB->ClipPtr->size;                         \
   const line_func LineFunc = tnl->Driver.Render.Line;          \
   const triangle_func TriangleFunc = tnl->Driver.Render.Triangle;      \
   const quad_func QuadFunc = tnl->Driver.Render.Quad;          \
   const GLboolean stipple = ctx->Line.StippleFlag;             \
   (void) (LineFunc && TriangleFunc && QuadFunc);               \
   (void) elt; (void) mask; (void) sz; (void) stipple;

#define NEED_EDGEFLAG_SETUP   (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL)
 

#define NEED_EDGEFLAG_SETUP   (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL)
 

#define PRESERVE_VB_DEFS
 

#define PRESERVE_VB_DEFS
 

#define RENDER_LINE v1,
v2       LineFunc( ctx, v1, v2 )
 

#define RENDER_LINE v1,
v2   
 

Value:

do {                                            \
   GLubyte c1 = mask[v1], c2 = mask[v2];        \
   GLubyte ormask = c1|c2;                      \
   if (!ormask)                                 \
      LineFunc( ctx, v1, v2 );                  \
   else if (!(c1 & c2 & CLIPMASK))                      \
      clip_line_4( ctx, v1, v2, ormask );       \
} while (0)

#define RENDER_POINTS start,
count       tnl->Driver.Render.Points( ctx, start, count )
 

#define RENDER_POINTS start,
count       tnl->Driver.Render.Points( ctx, start, count )
 

#define RENDER_QUAD v1,
v2,
v3,
v4       QuadFunc( ctx, v1, v2, v3, v4 )
 

#define RENDER_QUAD v1,
v2,
v3,
v4   
 

Value:

do {                                                    \
   GLubyte c1 = mask[v1], c2 = mask[v2];                \
   GLubyte c3 = mask[v3], c4 = mask[v4];                \
   GLubyte ormask = c1|c2|c3|c4;                        \
   if (!ormask)                                         \
      QuadFunc( ctx, v1, v2, v3, v4 );                  \
   else if (!(c1 & c2 & c3 & c4 & CLIPMASK))            \
      clip_quad_4( ctx, v1, v2, v3, v4, ormask );       \
} while (0)

#define RENDER_TAB_QUALIFIER
 

#define RENDER_TRI v1,
v2,
v3       TriangleFunc( ctx, v1, v2, v3 )
 

#define RENDER_TRI v1,
v2,
v3   
 

Value:

do {                                                    \
   GLubyte c1 = mask[v1], c2 = mask[v2], c3 = mask[v3]; \
   GLubyte ormask = c1|c2|c3;                           \
   if (!ormask)                                         \
      TriangleFunc( ctx, v1, v2, v3 );                  \
   else if (!(c1 & c2 & c3 & CLIPMASK))                         \
      clip_tri_4( ctx, v1, v2, v3, ormask );            \
} while (0)

#define RESET_OCCLUSION   ctx->OcclusionResult = GL_TRUE
 

#define RESET_OCCLUSION   ctx->OcclusionResult = GL_TRUE
 

#define RESET_STIPPLE   if (stipple) tnl->Driver.Render.ResetLineStipple( ctx )
 

#define RESET_STIPPLE   if (stipple) tnl->Driver.Render.ResetLineStipple( ctx )
 

#define SIZE   4
 

#define TAG      _tnl_##x##_elts
 

#define TAG      _tnl_##x##_verts
 

#define TAG      clip_##x##_elts
 

#define TAG      clip_##x##_verts
 

#define TAG      x##_4
 

#define W i       coord[i][3]
 

#define X i       coord[i][0]
 

#define Y i       coord[i][1]
 

#define Z i       coord[i][2]
 


Function Documentation

void _tnl_RenderClippedLine GLcontext   ctx,
GLuint    ii,
GLuint    jj
 

void _tnl_RenderClippedPolygon GLcontext   ctx,
const GLuint *    elts,
GLuint    n
 

void check_render GLcontext   ctx,
struct tnl_pipeline_stage   stage
[static]
 

void clip_elt_triangles GLcontext   ctx,
GLuint    start,
GLuint    count,
GLuint    flags
[static]
 

void dtr struct tnl_pipeline_stage   stage [static]
 

GLboolean run_render GLcontext   ctx,
struct tnl_pipeline_stage   stage
[static]
 


Variable Documentation

const struct tnl_pipeline_stage _tnl_render_stage
 

Initial value:

{
   "render",                    
   (_NEW_BUFFERS |
    _DD_NEW_SEPARATE_SPECULAR |
    _DD_NEW_FLATSHADE |
    _NEW_TEXTURE|
    _NEW_LIGHT|
    _NEW_POINT|
    _NEW_FOG|
    _DD_NEW_TRI_UNFILLED |
    _NEW_RENDERMODE),           
   0,                           
   GL_TRUE,                     
   0,                           
   0,                           
   0,                           
   NULL,                        
   dtr,                         
   check_render,                
   run_render                   
}


Generated on Sun May 16 15:55:27 2004 for Mesa Transform and Lighting (tnl) by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001