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

static void TAG() unfilled_tri ( GLcontext *  ctx,
GLenum  mode,
GLuint  e0,
GLuint  e1,
GLuint  e2 
) [static]

Definition at line 42 of file t_dd_unfilled.h.

{
   struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
   GLubyte *ef = VB->EdgeFlag;
   VERTEX *v[3];
   LOCAL_VARS(3);

   v[0] = (VERTEX *)GET_VERTEX(e0);
   v[1] = (VERTEX *)GET_VERTEX(e1);
   v[2] = (VERTEX *)GET_VERTEX(e2);

   if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
      if (HAVE_RGBA) {
     VERT_SAVE_RGBA(0);
     VERT_SAVE_RGBA(1);
     VERT_COPY_RGBA(v[0], v[2]);
     VERT_COPY_RGBA(v[1], v[2]);

     if (HAVE_SPEC) {
        VERT_SAVE_SPEC(0);
        VERT_SAVE_SPEC(1);
        VERT_COPY_SPEC(v[0], v[2]);
        VERT_COPY_SPEC(v[1], v[2]);
     }
      } else {
     VERT_SAVE_IND(0);
     VERT_SAVE_IND(1);
     VERT_COPY_IND(v[0], v[2]);
     VERT_COPY_IND(v[1], v[2]);
      }
   }

/*     fprintf(stderr, "%s %s %d %d %d\n", __FUNCTION__, */
/*         _mesa_lookup_enum_by_nr( mode ), */
/*         ef[e0], ef[e1], ef[e2]); */

   if (mode == GL_POINT) {
      RASTERIZE(GL_POINTS);
      if (ef[e0]) POINT( v[0] );
      if (ef[e1]) POINT( v[1] );
      if (ef[e2]) POINT( v[2] );
   }
   else {
      RASTERIZE(GL_LINES);
      if (RENDER_PRIMITIVE == GL_POLYGON) {
     if (ef[e2]) LINE( v[2], v[0] );
     if (ef[e0]) LINE( v[0], v[1] );
     if (ef[e1]) LINE( v[1], v[2] );
      }
      else {
     if (ef[e0]) LINE( v[0], v[1] );
     if (ef[e1]) LINE( v[1], v[2] );
     if (ef[e2]) LINE( v[2], v[0] );
      }
   }

   if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
      if (HAVE_RGBA) {
     VERT_RESTORE_RGBA(0);
     VERT_RESTORE_RGBA(1);

     if (HAVE_SPEC) {
        VERT_RESTORE_SPEC(0);
        VERT_RESTORE_SPEC(1);
     }
      } else {
     VERT_RESTORE_IND(0);
     VERT_RESTORE_IND(1);
      }
   }
}

Generated on Fri May 25 2012 04:58:26 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.