Add vao cache for static surfaces.
Remove support for draw range elements, multi draw arrays, world vao creation, surface merging.
This commit is contained in:
parent
127464ed19
commit
c65d2c2657
12 changed files with 413 additions and 730 deletions
|
@ -366,8 +366,6 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max
|
|||
int s, t;
|
||||
int firstVertex = tess.numVertexes;
|
||||
//int firstIndex = tess.numIndexes;
|
||||
int minIndex = tess.minIndex;
|
||||
int maxIndex = tess.maxIndex;
|
||||
vec4_t color;
|
||||
|
||||
//tess.numVertexes = 0;
|
||||
|
@ -417,9 +415,6 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max
|
|||
}
|
||||
}
|
||||
|
||||
tess.minIndex = firstVertex;
|
||||
tess.maxIndex = tess.numVertexes;
|
||||
|
||||
// FIXME: A lot of this can probably be removed for speed, and refactored into a more convenient function
|
||||
RB_UpdateTessVao(ATTR_POSITION | ATTR_TEXCOORD);
|
||||
/*
|
||||
|
@ -465,7 +460,7 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max
|
|||
GLSL_SetUniformVec4(sp, UNIFORM_DIFFUSETEXOFFTURB, vector);
|
||||
}
|
||||
|
||||
R_DrawElementsVao(tess.numIndexes - tess.firstIndex, tess.firstIndex, tess.minIndex, tess.maxIndex);
|
||||
R_DrawElements(tess.numIndexes - tess.firstIndex, tess.firstIndex);
|
||||
|
||||
//qglDrawElements(GL_TRIANGLES, tess.numIndexes - tess.firstIndex, GL_INDEX_TYPE, BUFFER_OFFSET(tess.firstIndex * sizeof(glIndex_t)));
|
||||
|
||||
|
@ -475,8 +470,6 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max
|
|||
tess.numIndexes = tess.firstIndex;
|
||||
tess.numVertexes = firstVertex;
|
||||
tess.firstIndex = 0;
|
||||
tess.minIndex = minIndex;
|
||||
tess.maxIndex = maxIndex;
|
||||
}
|
||||
|
||||
static void DrawSkyBox( shader_t *shader )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue