diff --git a/code/renderergl1/tr_shadows.c b/code/renderergl1/tr_shadows.c index 6059805..e998dd2 100644 --- a/code/renderergl1/tr_shadows.c +++ b/code/renderergl1/tr_shadows.c @@ -125,12 +125,14 @@ void R_RenderShadowEdges( void ) { // if it doesn't share the edge with another front facing // triangle, it is a sil edge if ( hit[ 1 ] == 0 ) { - qglBegin( GL_TRIANGLE_STRIP ); - qglVertex3fv( tess.xyz[ i ] ); - qglVertex3fv( shadowXyz[ i ] ); - qglVertex3fv( tess.xyz[ i2 ] ); - qglVertex3fv( shadowXyz[ i2 ] ); - qglEnd(); + float vertices[] = { + tess.xyz[i][0], tess.xyz[i][1], tess.xyz[i][2], + shadowXyz[i][0], shadowXyz[i][1], shadowXyz[i][2], + tess.xyz[i2][0], tess.xyz[i2][1], tess.xyz[i2][2], + shadowXyz[i2][0], shadowXyz[i2][1], shadowXyz[i2][2] + }; + vglVertexPointer( 3, GL_FLOAT, 0, 4, vertices ); + vglDrawObjects(GL_TRIANGLE_STRIP, 4, GL_TRUE); c_edges++; } else { c_rejected++; diff --git a/code/renderergl1/tr_sky.c b/code/renderergl1/tr_sky.c index 1d12e92..888440d 100644 --- a/code/renderergl1/tr_sky.c +++ b/code/renderergl1/tr_sky.c @@ -369,18 +369,24 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max for ( t = mins[1]+HALF_SKY_SUBDIVISIONS; t < maxs[1]+HALF_SKY_SUBDIVISIONS; t++ ) { - qglBegin( GL_TRIANGLE_STRIP ); - + float *texcoord = gTexCoordBuffer; + float *vertices = gVertexBuffer; + int numindices = 0; for ( s = mins[0]+HALF_SKY_SUBDIVISIONS; s <= maxs[0]+HALF_SKY_SUBDIVISIONS; s++ ) { - qglTexCoord2fv( s_skyTexCoords[t][s] ); - qglVertex3fv( s_skyPoints[t][s] ); - - qglTexCoord2fv( s_skyTexCoords[t+1][s] ); - qglVertex3fv( s_skyPoints[t+1][s] ); + memcpy(gTexCoordBuffer, s_skyTexCoords[t][s], sizeof(vec2_t)); + memcpy(gVertexBuffer, s_skyPoints[t][s], sizeof(vec3_t)); + gVertexBuffer += 3; + gTexCoordBuffer += 2; + memcpy(gTexCoordBuffer, s_skyTexCoords[t+1][s], sizeof(vec2_t)); + memcpy(gVertexBuffer, s_skyPoints[t+1][s], sizeof(vec3_t)); + gVertexBuffer += 3; + gTexCoordBuffer += 2; + numindices += 2; } - - qglEnd(); + vglVertexPointerMapped(vertices); + vglTexCoordPointerMapped(texcoord); + vglDrawObjects(GL_TRIANGLE_STRIP, numindices, GL_TRUE); } }