Ignore:
Timestamp:
May 23, 2000, 10:41:28 PM (25 years ago)
Author:
jeroen
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/3dfx/fxsdettmp.h

    r2938 r3598  
    33/*
    44 * Mesa 3-D graphics library
    5  * Version:  3.1
     5 * Version:  3.3
    66 *
    77 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
     
    4242 * See fxapi.h for more revision/author details.
    4343 */
    44  
    45  
    46 /* 
     44
     45
     46/*
    4747 * Notes: the folowing code works only if count is > start.
    4848 * Corrently we are looking for the pattern:
     
    5050 *
    5151 * For this:
    52  * #define STRIP0               ((u1 == v1) && (u2 == v0))     
    53  * #define STRIP1               ((u0 == v0) && (u2 == v1))
     52 * #define STRIP0               ((u1 == v1) && (u2 == v0))
     53 * #define STRIP1               ((u0 == v0) && (u2 == v1))
    5454 *
    5555 */
     
    5757
    5858static void TAG(render_vb_triangles_smooth_indirect_sd)
    59         ( struct vertex_buffer  *VB,
    60           GLuint                start,
    61           GLuint                count,
    62           GLuint                parity)
     59        ( struct vertex_buffer  *VB,
     60          GLuint                start,
     61          GLuint                count,
     62          GLuint                parity)
    6363{
    6464   GLint u0,u1,u2;
    6565   GLint v0,v1,v2;
    6666   GLuint *elt = VB->EltPtr->data;
    67    
    68    int   i;
     67
     68   int   i;
    6969   LOCAL_VARS
    70    
     70
    7171   INIT(GL_TRIANGLES);
    72    
     72
    7373   elt = &elt[start-1];
    7474   u0 = *(++elt);
     
    8181      v1 = *(++elt);
    8282      v2 = *(++elt);
    83    
    84       if (CLIPPED(u0,u1,u2)) 
     83
     84      if (CLIPPED(u0,u1,u2))
    8585      {
    86         if (!CULLED(u0,u1,u2))  SENDCLIPTRI(u0,u1,u2);
     86        if (!CULLED(u0,u1,u2))  SENDCLIPTRI(u0,u1,u2);
    8787      }
    8888      else
    8989      {
    90         if (STRIP0(u,v))
     90        if (STRIP0(u,v))
    9191         {
    9292            int   is_strips = 1;
    9393            int   parity = 0;
    9494            STRIPSLOCAL_VAR
    95            
    96             FLUSHTRI();
    97             STARTSTRIPS(u0,u1,u2);
    98             while (is_strips && i < count)
    99             {
    100                SENDSTRIPS(v2);
    101                
    102                u0 = v0; u1 = v1; u2 = v2; i+= 3;
    103                v0 = *(++elt);   
    104                v1 = *(++elt);
    105                v2 = *(++elt);
    106            
    107                if (parity) {
    108                   is_strips = STRIP0(u,v);
    109                   parity = 0;
    110                } else {
    111                   is_strips  = STRIP1(u,v);
    112                   parity = 1;
    113                }
    114              }
    115              FLUSHSTRIPS();
    116              
    117              if (i >= count)
    118                 return;
    119          }
    120          else
    121         {
     95
     96            FLUSHTRI();
     97            STARTSTRIPS(u0,u1,u2);
     98            while (is_strips && i < count)
     99            {
     100               SENDSTRIPS(v2);
     101
     102               u0 = v0; u1 = v1; u2 = v2; i+= 3;
     103               v0 = *(++elt);
     104               v1 = *(++elt);
     105               v2 = *(++elt);
     106
     107               if (parity) {
     108                  is_strips = STRIP0(u,v);
     109                  parity = 0;
     110               } else {
     111                  is_strips  = STRIP1(u,v);
     112                  parity = 1;
     113               }
     114             }
     115             FLUSHSTRIPS();
     116
     117             if (i >= count)
     118                return;
     119         }
     120         else
     121        {
    122122             SENDTRI(u0,u1,u2);
    123         }
     123        }
    124124      }
    125125      u0 = v0; u1 = v1; u2 = v2; i+= 3;
     
    127127   if (CLIPPED(u0,u1,u2))
    128128   {
    129       if (!CULLED(u0,u1,u2))    SENDCLIPTRI(u0,u1,u2);
     129      if (!CULLED(u0,u1,u2))    SENDCLIPTRI(u0,u1,u2);
    130130   }
    131131   else
     
    134134   }
    135135   FLUSHTRI();
    136    
     136
    137137}
    138  
     138
    139139#ifndef PRESERVE_VB_DEFS
    140140#undef SENDTRI
Note: See TracChangeset for help on using the changeset viewer.