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

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

void TAG (clip_draw_line)(GLcontext *ctx

Variables

void TNL_VERTEX * I
void TNL_VERTEX TNL_VERTEX * J

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

void TAG clip_draw_line    [static]
 


Variable Documentation

void TNL_VERTEX* I
 

void TNL_VERTEX TNL_VERTEX* J
 


Generated on Sun May 16 15:55:29 2004 for Mesa tnl_dd by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001