core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

t_dd_imm_vb.c File Reference


Defines

#define CLIP_DOTPROD(K, A, B, C, D)
#define POLY_CLIP(PLANE, A, B, C, D)
#define LINE_CLIP(PLANE, A, B, C, D)

Functions

static void TAG() clip_draw_line (GLcontext *ctx, TNL_VERTEX *I, TNL_VERTEX *J, GLuint mask)
static void TAG() clip_draw_triangle (GLcontext *ctx, TNL_VERTEX *v0, TNL_VERTEX *v1, TNL_VERTEX *v2, GLuint mask)
static __inline void TAG() draw_triangle (GLcontext *ctx, TNL_VERTEX *v0, TNL_VERTEX *v1, TNL_VERTEX *v2)
static __inline void TAG() draw_line (GLcontext *ctx, TNL_VERTEX *v0, TNL_VERTEX *v1)


Define Documentation

#define CLIP_DOTPROD ( K,
A,
B,
C,
 ) 

Value:

(CLIP_X(K)*A + CLIP_Y(K)*B +    \
    CLIP_Z(K)*C + CLIP_W(K)*D)

#define LINE_CLIP ( PLANE,
A,
B,
C,
 ) 

Value:

do {                                                    \
   if (mask & PLANE) {                                  \
      GLfloat dpI = CLIP_DOTPROD( I, A, B, C, D );      \
      GLfloat dpJ = CLIP_DOTPROD( J, A, B, C, D );      \
                                                        \
      if (DIFFERENT_SIGNS(dpI, dpJ)) {                  \
         TNL_VERTEX *O = verts++;                       \
         if (NEGATIVE(dpJ)) {                           \
            GLfloat t = dpI / (dpI - dpJ);              \
            INTERP( ctx, t, O, I, J );  \
            J = O;                                      \
         } else {                                       \
            GLfloat t = dpJ / (dpJ - dpI);              \
            INTERP( ctx, t, O, J, I );  \
            I = O;                                      \
         }                                              \
      }                                                 \
      else if (NEGATIVE(dpI))                           \
         return;                                        \
  }                                                     \
} while (0)

#define POLY_CLIP ( PLANE,
A,
B,
C,
 ) 


Function Documentation

static void TAG() clip_draw_line ( GLcontext ctx,
TNL_VERTEX *  I,
TNL_VERTEX *  J,
GLuint  mask 
) [static]

static void TAG() clip_draw_triangle ( GLcontext ctx,
TNL_VERTEX *  v0,
TNL_VERTEX *  v1,
TNL_VERTEX *  v2,
GLuint  mask 
) [static]

static __inline void TAG() draw_line ( GLcontext ctx,
TNL_VERTEX *  v0,
TNL_VERTEX *  v1 
) [static]

static __inline void TAG() draw_triangle ( GLcontext ctx,
TNL_VERTEX *  v0,
TNL_VERTEX *  v1,
TNL_VERTEX *  v2 
) [static]


Generated on Sun Sep 27 06:48:12 2009 for Mesa tnl_dd by  doxygen 1.5.4