mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 21:51:09 +00:00
- removed gl_usevbo CVAR because with recent code changes it has become useless. If GL_ARB_buffer_storage is present, buffers will always be used.
This commit is contained in:
parent
ea332383a8
commit
1aaa1b7bad
3 changed files with 4 additions and 18 deletions
|
@ -49,19 +49,6 @@
|
|||
#include "gl/data/gl_vertexbuffer.h"
|
||||
|
||||
|
||||
CUSTOM_CVAR(Int, gl_usevbo, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
if (self < -1 || self > 1 || !(gl.flags & RFL_BUFFER_STORAGE))
|
||||
{
|
||||
if (self != 0) self = 0;
|
||||
}
|
||||
else if (self == -1)
|
||||
{
|
||||
if (!(gl.flags & RFL_BUFFER_STORAGE)) self = 0;
|
||||
else self = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Create / destroy the VBO
|
||||
|
@ -71,7 +58,6 @@ CUSTOM_CVAR(Int, gl_usevbo, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCA
|
|||
FVertexBuffer::FVertexBuffer()
|
||||
{
|
||||
vbo_id = 0;
|
||||
if (gl_usevbo == -1) gl_usevbo.Callback();
|
||||
glGenBuffers(1, &vbo_id);
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ void GLFlat::DrawSubsectors(int pass, bool istrans)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (gl_usevbo && vboindex >= 0)
|
||||
if (vboindex >= 0)
|
||||
{
|
||||
int index = vboindex;
|
||||
for (int i=0; i<sector->subsectorcount; i++)
|
||||
|
@ -303,9 +303,9 @@ void GLFlat::DrawSubsectors(int pass, bool istrans)
|
|||
if (gl_drawinfo->ss_renderflags[sub-subsectors]&renderflags || istrans)
|
||||
{
|
||||
if (pass == GLPASS_ALL) lightsapplied = SetupSubsectorLights(lightsapplied, sub);
|
||||
//drawcalls.Clock();
|
||||
drawcalls.Clock();
|
||||
glDrawArrays(GL_TRIANGLE_FAN, index, sub->numlines);
|
||||
//drawcalls.Unclock();
|
||||
drawcalls.Unclock();
|
||||
flatvertices += sub->numlines;
|
||||
flatprimitives++;
|
||||
}
|
||||
|
|
|
@ -385,8 +385,8 @@ void FShaderManager::CompileShaders()
|
|||
// If shader compilation failed we can still run the fixed function mode so do that instead of aborting.
|
||||
Printf("%s\n", err.GetMessage());
|
||||
Printf(PRINT_HIGH, "Failed to compile shaders. Reverting to fixed function mode\n");
|
||||
gl_usevbo = false;
|
||||
gl.glslversion = 0.0;
|
||||
gl.flags &= ~RFL_BUFFER_STORAGE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue