Commit 264125f4 authored by Rinnegatamante's avatar Rinnegatamante
Browse files

Optimized a bit game renderer.

parent b6d362cf
...@@ -80,6 +80,9 @@ uint16_t* indices; ...@@ -80,6 +80,9 @@ uint16_t* indices;
float *gVertexBuffer; float *gVertexBuffer;
float *gColorBuffer; float *gColorBuffer;
float *gTexCoordBuffer; float *gTexCoordBuffer;
float *gVertexBufferPtr;
float *gColorBufferPtr;
float *gTexCoordBufferPtr;
uint8_t inited = 0; uint8_t inited = 0;
typedef struct vidmode_s typedef struct vidmode_s
...@@ -114,7 +117,7 @@ void GLimp_Init( qboolean coreContext) ...@@ -114,7 +117,7 @@ void GLimp_Init( qboolean coreContext)
glConfig.isFullscreen = qtrue; glConfig.isFullscreen = qtrue;
if (!inited){ if (!inited){
vglInitExtended(0x800000, glConfig.vidWidth, glConfig.vidHeight, 0x1000000); vglInitExtended(0x100000, glConfig.vidWidth, glConfig.vidHeight, 0x1000000);
vglUseVram(GL_TRUE); vglUseVram(GL_TRUE);
vglMapHeapMem(); vglMapHeapMem();
inited = 1; inited = 1;
...@@ -130,10 +133,13 @@ void GLimp_Init( qboolean coreContext) ...@@ -130,10 +133,13 @@ void GLimp_Init( qboolean coreContext)
} }
vglIndexPointerMapped(indices); vglIndexPointerMapped(indices);
glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_VERTEX_ARRAY);
gVertexBuffer = (float*)malloc(sizeof(float)*VERTEXARRAYSIZE); gVertexBufferPtr = (float*)malloc(0x400000);
gColorBuffer = (float*)malloc(sizeof(float)*VERTEXARRAYSIZE); gColorBufferPtr = (float*)malloc(0x200000);
gTexCoordBuffer = (float*)malloc(sizeof(float)*VERTEXARRAYSIZE); gTexCoordBufferPtr = (float*)malloc(0x200000);
gVertexBuffer = gVertexBufferPtr;
gColorBuffer = gColorBufferPtr;
gTexCoordBuffer = gTexCoordBufferPtr;
strncpy(glConfig.vendor_string, glGetString(GL_VENDOR), sizeof(glConfig.vendor_string)); strncpy(glConfig.vendor_string, glGetString(GL_VENDOR), sizeof(glConfig.vendor_string));
strncpy(glConfig.renderer_string, glGetString(GL_RENDERER), sizeof(glConfig.renderer_string)); strncpy(glConfig.renderer_string, glGetString(GL_RENDERER), sizeof(glConfig.renderer_string));
strncpy(glConfig.version_string, glGetString(GL_VERSION), sizeof(glConfig.version_string)); strncpy(glConfig.version_string, glGetString(GL_VERSION), sizeof(glConfig.version_string));
...@@ -157,4 +163,7 @@ void GLimp_EndFrame( void ) ...@@ -157,4 +163,7 @@ void GLimp_EndFrame( void )
vglStopRendering(); vglStopRendering();
vglStartRendering(); vglStartRendering();
vglIndexPointerMapped(indices); vglIndexPointerMapped(indices);
gVertexBuffer = gVertexBufferPtr;
gColorBuffer = gColorBufferPtr;
gTexCoordBuffer = gTexCoordBufferPtr;
} }
...@@ -33,6 +33,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ...@@ -33,6 +33,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
extern float *gVertexBuffer; extern float *gVertexBuffer;
extern float *gColorBuffer; extern float *gColorBuffer;
extern float *gTexCoordBuffer; extern float *gTexCoordBuffer;
extern float *gVertexBufferPtr;
extern float *gColorBufferPtr;
extern float *gTexCoordBufferPtr;
extern uint16_t *indices; extern uint16_t *indices;
#include "vitaGL.h" #include "vitaGL.h"
......
...@@ -111,10 +111,10 @@ static void DrawTris (shaderCommands_t *input) { ...@@ -111,10 +111,10 @@ static void DrawTris (shaderCommands_t *input) {
float *vertices = gVertexBuffer; float *vertices = gVertexBuffer;
int i; int i;
for (i=0;i<input->numIndexes;i++){ for (i=0;i<input->numIndexes;i++){
memcpy(vertices, input->xyz[input->indexes[i]], sizeof(vec3_t)); memcpy(gVertexBuffer, input->xyz[input->indexes[i]], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
} }
vglVertexPointer(3, GL_FLOAT, 0, input->numIndexes, gVertexBuffer); vglVertexPointerMapped(vertices);
//->if (qglLockArraysEXT) { //->if (qglLockArraysEXT) {
//-> qglLockArraysEXT(0, input->numVertexes); //-> qglLockArraysEXT(0, input->numVertexes);
...@@ -149,13 +149,13 @@ static void DrawNormals (shaderCommands_t *input) { ...@@ -149,13 +149,13 @@ static void DrawNormals (shaderCommands_t *input) {
float *vertices = gVertexBuffer; float *vertices = gVertexBuffer;
for (i = 0 ; i < input->numVertexes ; i++) { for (i = 0 ; i < input->numVertexes ; i++) {
memcpy(vertices, input->xyz[input->indexes[i]], sizeof(vec3_t)); memcpy(gVertexBuffer, input->xyz[input->indexes[i]], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
VectorMA (input->xyz[input->indexes[i]], 2, input->normal[input->indexes[i]], temp); VectorMA (input->xyz[input->indexes[i]], 2, input->normal[input->indexes[i]], temp);
memcpy(vertices, temp, sizeof(vec3_t)); memcpy(gVertexBuffer, temp, sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
} }
vglVertexPointer(3, GL_FLOAT, 0, input->numVertexes * 2, gVertexBuffer); vglVertexPointerMapped(vertices);
vglDrawObjects(GL_LINES, input->numVertexes * 2, GL_TRUE); vglDrawObjects(GL_LINES, input->numVertexes * 2, GL_TRUE);
qglDepthRange( 0, 1 ); qglDepthRange( 0, 1 );
...@@ -221,10 +221,10 @@ static void DrawMultitextured( shaderCommands_t *input, int stage ) { ...@@ -221,10 +221,10 @@ static void DrawMultitextured( shaderCommands_t *input, int stage ) {
float *texcoord = gTexCoordBuffer; float *texcoord = gTexCoordBuffer;
int i; int i;
for (i = 0 ; i < input->numIndexes ; i++) { for (i = 0 ; i < input->numIndexes ; i++) {
memcpy(texcoord, input->svars.texcoords[0][input->indexes[i]], sizeof(vec2_t)); memcpy(gTexCoordBuffer, input->svars.texcoords[0][input->indexes[i]], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
} }
vglTexCoordPointer( 2, GL_FLOAT, 0, input->numIndexes, gTexCoordBuffer ); vglTexCoordPointerMapped(texcoord);
R_BindAnimatedImage( &pStage->bundle[0] ); R_BindAnimatedImage( &pStage->bundle[0] );
R_DrawElements( input->numIndexes, input->indexes ); R_DrawElements( input->numIndexes, input->indexes );
...@@ -244,10 +244,10 @@ static void DrawMultitextured( shaderCommands_t *input, int stage ) { ...@@ -244,10 +244,10 @@ static void DrawMultitextured( shaderCommands_t *input, int stage ) {
texcoord = gTexCoordBuffer; texcoord = gTexCoordBuffer;
for (i = 0 ; i < input->numIndexes ; i++) { for (i = 0 ; i < input->numIndexes ; i++) {
memcpy(texcoord, input->svars.texcoords[1][input->indexes[i]], sizeof(vec2_t)); memcpy(gTexCoordBuffer, input->svars.texcoords[1][input->indexes[i]], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
} }
vglTexCoordPointer( 2, GL_FLOAT, 0, input->numIndexes, gTexCoordBuffer ); vglTexCoordPointerMapped(texcoord);
R_BindAnimatedImage( &pStage->bundle[1] ); R_BindAnimatedImage( &pStage->bundle[1] );
R_DrawElements( input->numIndexes, input->indexes ); R_DrawElements( input->numIndexes, input->indexes );
...@@ -406,13 +406,13 @@ static void ProjectDlightTexture_scalar( void ) { ...@@ -406,13 +406,13 @@ static void ProjectDlightTexture_scalar( void ) {
float *texcoord = gTexCoordBuffer; float *texcoord = gTexCoordBuffer;
float *colorbuf = gColorBuffer; float *colorbuf = gColorBuffer;
for (i = 0 ; i < numIndexes ; i++) { for (i = 0 ; i < numIndexes ; i++) {
memcpy(texcoord, texCoordsArray[hitIndexes[i]], sizeof(vec2_t)); memcpy(gTexCoordBuffer, texCoordsArray[hitIndexes[i]], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
memcpy(colorbuf, colorArray[hitIndexes[i]], sizeof(vec4_t)); memcpy(gColorBuffer, colorArray[hitIndexes[i]], sizeof(vec4_t));
colorbuf += 4; gColorBuffer += 4;
} }
vglColorPointer( 4, GL_FLOAT, 0, numIndexes, gColorBuffer); vglColorPointerMapped(GL_FLOAT, colorbuf);
vglTexCoordPointer( 2, GL_FLOAT, 0, numIndexes, gTexCoordBuffer ); vglTexCoordPointerMapped(texcoord);
GL_Bind( tr.dlightImage ); GL_Bind( tr.dlightImage );
// include GLS_DEPTHFUNC_EQUAL so alpha tested surfaces don't add light // include GLS_DEPTHFUNC_EQUAL so alpha tested surfaces don't add light
...@@ -466,16 +466,16 @@ static void RB_FogPass( void ) { ...@@ -466,16 +466,16 @@ static void RB_FogPass( void ) {
float *texcoord = gTexCoordBuffer; float *texcoord = gTexCoordBuffer;
float *colorbuf = gColorBuffer; float *colorbuf = gColorBuffer;
for (i = 0 ; i < tess.numIndexes ; i++) { for (i = 0 ; i < tess.numIndexes ; i++) {
colorbuf[0] = (float)(tess.svars.colors[tess.indexes[i]][0]) / 255.0f; gColorBuffer[0] = (float)(tess.svars.colors[tess.indexes[i]][0]) / 255.0f;
colorbuf[1] = (float)(tess.svars.colors[tess.indexes[i]][1]) / 255.0f; gColorBuffer[1] = (float)(tess.svars.colors[tess.indexes[i]][1]) / 255.0f;
colorbuf[2] = (float)(tess.svars.colors[tess.indexes[i]][2]) / 255.0f; gColorBuffer[2] = (float)(tess.svars.colors[tess.indexes[i]][2]) / 255.0f;
colorbuf[3] = (float)(tess.svars.colors[tess.indexes[i]][3]) / 255.0f; gColorBuffer[3] = (float)(tess.svars.colors[tess.indexes[i]][3]) / 255.0f;
memcpy(texcoord, tess.svars.texcoords[0][tess.indexes[i]], sizeof(vec2_t)); memcpy(gTexCoordBuffer, tess.svars.texcoords[0][tess.indexes[i]], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
colorbuf += 4; gColorBuffer += 4;
} }
vglColorPointer( 4, GL_FLOAT, 0, tess.numIndexes, gColorBuffer); vglColorPointerMapped(GL_FLOAT, colorbuf);
vglTexCoordPointer( 2, GL_FLOAT, 0, tess.numIndexes, gTexCoordBuffer ); vglTexCoordPointerMapped(texcoord);
R_DrawElements( tess.numIndexes, tess.indexes ); R_DrawElements( tess.numIndexes, tess.indexes );
} }
...@@ -823,13 +823,13 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input ) ...@@ -823,13 +823,13 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input )
float *colorbuf = gColorBuffer; float *colorbuf = gColorBuffer;
int i; int i;
for (i = 0 ; i < input->numIndexes ; i++) { for (i = 0 ; i < input->numIndexes ; i++) {
colorbuf[0] = (float)(input->svars.colors[input->indexes[i]][0]) / 255.0f; gColorBuffer[0] = (float)(input->svars.colors[input->indexes[i]][0]) / 255.0f;
colorbuf[1] = (float)(input->svars.colors[input->indexes[i]][1]) / 255.0f; gColorBuffer[1] = (float)(input->svars.colors[input->indexes[i]][1]) / 255.0f;
colorbuf[2] = (float)(input->svars.colors[input->indexes[i]][2]) / 255.0f; gColorBuffer[2] = (float)(input->svars.colors[input->indexes[i]][2]) / 255.0f;
colorbuf[3] = (float)(input->svars.colors[input->indexes[i]][3]) / 255.0f; gColorBuffer[3] = (float)(input->svars.colors[input->indexes[i]][3]) / 255.0f;
colorbuf += 4; gColorBuffer += 4;
} }
vglColorPointer( 4, GL_FLOAT, 0, input->numIndexes, gColorBuffer); vglColorPointerMapped(GL_FLOAT, colorbuf);
//} //}
// //
...@@ -846,10 +846,10 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input ) ...@@ -846,10 +846,10 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input )
float *texcoord = gTexCoordBuffer; float *texcoord = gTexCoordBuffer;
int i; int i;
for (i = 0 ; i < input->numIndexes ; i++) { for (i = 0 ; i < input->numIndexes ; i++) {
memcpy(texcoord, input->svars.texcoords[0][input->indexes[i]], sizeof(vec2_t)); memcpy(gTexCoordBuffer, input->svars.texcoords[0][input->indexes[i]], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
} }
vglTexCoordPointer( 2, GL_FLOAT, 0, input->numIndexes, gTexCoordBuffer); vglTexCoordPointerMapped(texcoord);
//} //}
// //
...@@ -912,10 +912,10 @@ void RB_StageIteratorGeneric( void ) ...@@ -912,10 +912,10 @@ void RB_StageIteratorGeneric( void )
float *vertices = gVertexBuffer; float *vertices = gVertexBuffer;
int i; int i;
for (i=0;i<input->numIndexes;i++){ for (i=0;i<input->numIndexes;i++){
memcpy(vertices, input->xyz[input->indexes[i]], sizeof(vec3_t)); memcpy(gVertexBuffer, input->xyz[input->indexes[i]], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
} }
vglVertexPointer(3, GL_FLOAT, 0, input->numIndexes, gVertexBuffer); vglVertexPointerMapped(vertices);
//->if (qglLockArraysEXT) //->if (qglLockArraysEXT)
//->{ //->{
...@@ -1004,19 +1004,19 @@ void RB_StageIteratorVertexLitTexture( void ) ...@@ -1004,19 +1004,19 @@ void RB_StageIteratorVertexLitTexture( void )
float *vertices = gVertexBuffer; float *vertices = gVertexBuffer;
int i; int i;
for (i = 0 ; i < tess.numIndexes ; i++) { for (i = 0 ; i < tess.numIndexes ; i++) {
colorbuf[0] = (float)(tess.svars.colors[tess.indexes[i]][0]) / 255.0f; gColorBuffer[0] = (float)(tess.svars.colors[tess.indexes[i]][0]) / 255.0f;
colorbuf[1] = (float)(tess.svars.colors[tess.indexes[i]][1]) / 255.0f; gColorBuffer[1] = (float)(tess.svars.colors[tess.indexes[i]][1]) / 255.0f;
colorbuf[2] = (float)(tess.svars.colors[tess.indexes[i]][2]) / 255.0f; gColorBuffer[2] = (float)(tess.svars.colors[tess.indexes[i]][2]) / 255.0f;
colorbuf[3] = (float)(tess.svars.colors[tess.indexes[i]][3]) / 255.0f; gColorBuffer[3] = (float)(tess.svars.colors[tess.indexes[i]][3]) / 255.0f;
colorbuf += 4; gColorBuffer += 4;
memcpy(texcoord, tess.texCoords[tess.indexes[i]][0], sizeof(vec2_t)); memcpy(gTexCoordBuffer, tess.texCoords[tess.indexes[i]][0], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
memcpy(vertices, input->xyz[input->indexes[i]], sizeof(vec3_t)); memcpy(gVertexBuffer, input->xyz[input->indexes[i]], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
} }
vglColorPointer( 4, GL_FLOAT, 0, tess.numIndexes, gColorBuffer); vglColorPointerMapped(GL_FLOAT, colorbuf);
vglTexCoordPointer(2, GL_FLOAT, 0, tess.numIndexes, gTexCoordBuffer); vglTexCoordPointerMapped(texcoord);
vglVertexPointer(3, GL_FLOAT, 0, input->numIndexes, gVertexBuffer); vglVertexPointerMapped(vertices);
//->if ( qglLockArraysEXT ) //->if ( qglLockArraysEXT )
//->{ //->{
...@@ -1087,16 +1087,16 @@ void RB_StageIteratorLightmappedMultitexture( void ) { ...@@ -1087,16 +1087,16 @@ void RB_StageIteratorLightmappedMultitexture( void ) {
float *vertices = gVertexBuffer; float *vertices = gVertexBuffer;
float *colorbuf = gColorBuffer; float *colorbuf = gColorBuffer;
for (i = 0 ; i < input->numIndexes ; i++) { for (i = 0 ; i < input->numIndexes ; i++) {
memcpy(vertices, input->xyz[input->indexes[i]], sizeof(vec3_t)); memcpy(gVertexBuffer, input->xyz[input->indexes[i]], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
colorbuf[0] = 1.0f; gColorBuffer[0] = 1.0f;
colorbuf[1] = 1.0f; gColorBuffer[1] = 1.0f;
colorbuf[2] = 1.0f; gColorBuffer[2] = 1.0f;
colorbuf[3] = 1.0f; gColorBuffer[3] = 1.0f;
colorbuf += 4; gColorBuffer += 4;
} }
vglVertexPointer(3, GL_FLOAT, 0, input->numIndexes, gVertexBuffer); vglVertexPointerMapped(vertices);
vglColorPointer( 4, GL_FLOAT, 0, tess.numIndexes, gColorBuffer); vglColorPointerMapped(GL_FLOAT, colorbuf);
// //
// select base stage // select base stage
...@@ -1108,10 +1108,10 @@ void RB_StageIteratorLightmappedMultitexture( void ) { ...@@ -1108,10 +1108,10 @@ void RB_StageIteratorLightmappedMultitexture( void ) {
float *texcoord = gTexCoordBuffer; float *texcoord = gTexCoordBuffer;
for (i = 0 ; i < tess.numIndexes ; i++) { for (i = 0 ; i < tess.numIndexes ; i++) {
memcpy(texcoord, tess.texCoords[tess.indexes[i]][0], sizeof(vec2_t)); memcpy(gTexCoordBuffer, tess.texCoords[tess.indexes[i]][0], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
} }
vglTexCoordPointer(2, GL_FLOAT, 0, tess.numIndexes, gTexCoordBuffer); vglTexCoordPointerMapped(texcoord);
R_DrawElements( input->numIndexes, input->indexes ); R_DrawElements( input->numIndexes, input->indexes );
// //
...@@ -1127,10 +1127,10 @@ void RB_StageIteratorLightmappedMultitexture( void ) { ...@@ -1127,10 +1127,10 @@ void RB_StageIteratorLightmappedMultitexture( void ) {
R_BindAnimatedImage( &tess.xstages[0]->bundle[1] ); R_BindAnimatedImage( &tess.xstages[0]->bundle[1] );
texcoord = gTexCoordBuffer; texcoord = gTexCoordBuffer;
for (i = 0 ; i < tess.numIndexes ; i++) { for (i = 0 ; i < tess.numIndexes ; i++) {
memcpy(texcoord, tess.texCoords[tess.indexes[i]][1], sizeof(vec2_t)); memcpy(gTexCoordBuffer, tess.texCoords[tess.indexes[i]][1], sizeof(vec2_t));
texcoord += 2; gTexCoordBuffer += 2;
} }
vglTexCoordPointer(2, GL_FLOAT, 0, tess.numIndexes, gTexCoordBuffer); vglTexCoordPointerMapped(texcoord);
// //
// lock arrays // lock arrays
......
...@@ -375,18 +375,18 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max ...@@ -375,18 +375,18 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max
int numindices = 0; int numindices = 0;
for ( s = mins[0]+HALF_SKY_SUBDIVISIONS; s <= maxs[0]+HALF_SKY_SUBDIVISIONS; s++ ) for ( s = mins[0]+HALF_SKY_SUBDIVISIONS; s <= maxs[0]+HALF_SKY_SUBDIVISIONS; s++ )
{ {
memcpy(texcoord, s_skyTexCoords[t][s], sizeof(vec2_t)); memcpy(gTexCoordBuffer, s_skyTexCoords[t][s], sizeof(vec2_t));
memcpy(vertices, s_skyPoints[t][s], sizeof(vec3_t)); memcpy(gVertexBuffer, s_skyPoints[t][s], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
texcoord += 2; gTexCoordBuffer += 2;
memcpy(texcoord, s_skyTexCoords[t+1][s], sizeof(vec2_t)); memcpy(gTexCoordBuffer, s_skyTexCoords[t+1][s], sizeof(vec2_t));
memcpy(vertices, s_skyPoints[t+1][s], sizeof(vec3_t)); memcpy(gVertexBuffer, s_skyPoints[t+1][s], sizeof(vec3_t));
vertices += 3; gVertexBuffer += 3;
texcoord += 2; gTexCoordBuffer += 2;
numindices += 2; numindices += 2;
} }
vglVertexPointer(3, GL_FLOAT, 0, numindices, gVertexBuffer); vglVertexPointerMapped(vertices);
vglTexCoordPointer(2, GL_FLOAT, 0, numindices, gTexCoordBuffer); vglTexCoordPointerMapped(texcoord);
vglDrawObjects(GL_TRIANGLE_STRIP, numindices, GL_TRUE); vglDrawObjects(GL_TRIANGLE_STRIP, numindices, GL_TRUE);
} }
//glDisableClientState(GL_TEXTURE_COORD_ARRAY); //glDisableClientState(GL_TEXTURE_COORD_ARRAY);
......
...@@ -327,12 +327,12 @@ static void RB_SurfaceBeam( void ) ...@@ -327,12 +327,12 @@ static void RB_SurfaceBeam( void )
float *pPos = gVertexBuffer; float *pPos = gVertexBuffer;
for ( i = 0; i <= NUM_BEAM_SEGS; i++ ) { for ( i = 0; i <= NUM_BEAM_SEGS; i++ ) {
memcpy(pPos, start_points[ i % NUM_BEAM_SEGS], sizeof(vec3_t)); memcpy(gVertexBuffer, start_points[ i % NUM_BEAM_SEGS], sizeof(vec3_t));
pPos+=3; gVertexBuffer+=3;
memcpy(pPos, end_points[ i % NUM_BEAM_SEGS], sizeof(vec3_t)); memcpy(gVertexBuffer, end_points[ i % NUM_BEAM_SEGS], sizeof(vec3_t));
pPos+=3; gVertexBuffer+=3;
} }
vglVertexPointer(3, GL_FLOAT, 0, (NUM_BEAM_SEGS + 1) * 2, gVertexBuffer); vglVertexPointerMapped(pPos);
vglDrawObjects(GL_TRIANGLE_STRIP, (NUM_BEAM_SEGS + 1) * 2, GL_TRUE); vglDrawObjects(GL_TRIANGLE_STRIP, (NUM_BEAM_SEGS + 1) * 2, GL_TRUE);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment