OpenGL2: Force VAO usage on OpenGL 3.0+

This commit is contained in:
SmileTheory 2017-08-08 20:20:11 -07:00
parent 3f415abe61
commit 9d1c6748f5
1 changed files with 10 additions and 2 deletions

View File

@ -112,9 +112,17 @@ void GLimp_InitExtraExtensions()
// OpenGL 3.0 - GL_ARB_vertex_array_object // OpenGL 3.0 - GL_ARB_vertex_array_object
extension = "GL_ARB_vertex_array_object"; extension = "GL_ARB_vertex_array_object";
glRefConfig.vertexArrayObject = qfalse; 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; QGL_ARB_vertex_array_object_PROCS;