Skip to content

Commit

Permalink
OpenGL2: Force VAO usage on OpenGL 3.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileTheory committed Aug 9, 2017
1 parent 3f415ab commit 9d1c674
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions code/renderergl2/tr_extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,17 @@ void GLimp_InitExtraExtensions()
// OpenGL 3.0 - GL_ARB_vertex_array_object
extension = "GL_ARB_vertex_array_object";
glRefConfig.vertexArrayObject = qfalse;
if (SDL_GL_ExtensionSupported(extension))
if (q_gl_version_at_least_3_0 || SDL_GL_ExtensionSupported(extension))
{
glRefConfig.vertexArrayObject = !!r_arb_vertex_array_object->integer;
if (q_gl_version_at_least_3_0)
{
// force VAO, core context requires it
glRefConfig.vertexArrayObject = qtrue;
}
else
{
glRefConfig.vertexArrayObject = !!r_arb_vertex_array_object->integer;
}

QGL_ARB_vertex_array_object_PROCS;

Expand Down

0 comments on commit 9d1c674

Please sign in to comment.