- 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:
Christoph Oelckers 2014-06-15 12:12:24 +02:00
parent ea332383a8
commit 1aaa1b7bad
3 changed files with 4 additions and 18 deletions

View file

@ -49,19 +49,6 @@
#include "gl/data/gl_vertexbuffer.h" #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 // Create / destroy the VBO
@ -71,7 +58,6 @@ CUSTOM_CVAR(Int, gl_usevbo, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCA
FVertexBuffer::FVertexBuffer() FVertexBuffer::FVertexBuffer()
{ {
vbo_id = 0; vbo_id = 0;
if (gl_usevbo == -1) gl_usevbo.Callback();
glGenBuffers(1, &vbo_id); glGenBuffers(1, &vbo_id);
} }

View file

@ -293,7 +293,7 @@ void GLFlat::DrawSubsectors(int pass, bool istrans)
} }
else else
{ {
if (gl_usevbo && vboindex >= 0) if (vboindex >= 0)
{ {
int index = vboindex; int index = vboindex;
for (int i=0; i<sector->subsectorcount; i++) 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 (gl_drawinfo->ss_renderflags[sub-subsectors]&renderflags || istrans)
{ {
if (pass == GLPASS_ALL) lightsapplied = SetupSubsectorLights(lightsapplied, sub); if (pass == GLPASS_ALL) lightsapplied = SetupSubsectorLights(lightsapplied, sub);
//drawcalls.Clock(); drawcalls.Clock();
glDrawArrays(GL_TRIANGLE_FAN, index, sub->numlines); glDrawArrays(GL_TRIANGLE_FAN, index, sub->numlines);
//drawcalls.Unclock(); drawcalls.Unclock();
flatvertices += sub->numlines; flatvertices += sub->numlines;
flatprimitives++; flatprimitives++;
} }

View file

@ -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. // If shader compilation failed we can still run the fixed function mode so do that instead of aborting.
Printf("%s\n", err.GetMessage()); Printf("%s\n", err.GetMessage());
Printf(PRINT_HIGH, "Failed to compile shaders. Reverting to fixed function mode\n"); Printf(PRINT_HIGH, "Failed to compile shaders. Reverting to fixed function mode\n");
gl_usevbo = false;
gl.glslversion = 0.0; gl.glslversion = 0.0;
gl.flags &= ~RFL_BUFFER_STORAGE;
} }
} }