Source/ThunderBeast/QuakeToonProto1/refresh/ref_gl.c
/*
================
GL_SubdivideSurface

Breaks a polygon up along axial 64 unit
boundaries so that turbulent and sky warps
can be done reasonably.
================
*/
GL_SubdivideSurface
Breaks a polygon up along axial 64 unit
boundaries so that turbulent and sky warps
can be done reasonably.
GL_SubdivideSurface Breaks a polygon up along axial 64 unit boundaries so that turbulent and sky warps can be done reasonably .
void GL_SubdivideSurface (msurface_t *fa)
{
    vec3_t		verts[64];
    int			numverts;
    int			i;
    int			lindex;
    float		*vec;
    warpface = fa;
     convert edges back to a normal polygon
    numverts = 0;
    for (i=0 ; i<fa->numedges ; i++)
    {
        lindex = loadmodel->surfedges[fa->firstedge + i];
        if (lindex > 0)
            vec = loadmodel->vertexes[loadmodel->edges[lindex].v[0]].position;
        else
            vec = loadmodel->vertexes[loadmodel->edges[-lindex].v[1]].position;
        VectorCopy (vec, verts[numverts]);
        numverts++;
    }
    SubdividePolygon (numverts, verts[0]);
}
void GL_SubdivideSurface ( msurface_t * fa ) { vec3_t verts [ 64 ] ; int numverts ; int i ; int lindex ; float * vec ; warpface = fa ; numverts = 0 ; for ( i = 0 ; i < fa -> numedges ; i ++ ) { lindex = loadmodel -> surfedges [ fa -> firstedge + i ] ; if ( lindex > 0 ) vec = loadmodel -> vertexes [ loadmodel -> edges [ lindex ] . v [ 0 ] ] . position ; else vec = loadmodel -> vertexes [ loadmodel -> edges [ - lindex ] . v [ 1 ] ] . position ; VectorCopy ( vec , verts [ numverts ] ) ; numverts ++ ; } SubdividePolygon ( numverts , verts [ 0 ] ) ; }
GL_SubdivideSurface
Breaks a polygon up along axial 64 unit
boundaries so that turbulent and sky warps
can be done reasonably.
GL_SubdivideSurface Breaks a polygon up along axial 64 unit boundaries so that turbulent and sky warps can be done reasonably .
// // convert edges back to a normal polygon //