diff --git a/src/gl/data/gl_vertexbuffer.cpp b/src/gl/data/gl_vertexbuffer.cpp index 559131d36..6ba9f794e 100644 --- a/src/gl/data/gl_vertexbuffer.cpp +++ b/src/gl/data/gl_vertexbuffer.cpp @@ -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); } diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 59d4192e7..6b34fb659 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -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; isubsectorcount; 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++; } diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index 0b55fbd35..b90974222 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -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; } }