[ioquake3] 03/34: OpenGL2: Force VAO usage on OpenGL 3.0+
Simon McVittie
smcv at debian.org
Fri Sep 8 10:33:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag debian/1.36+u20170908+dfsg1-1
in repository ioquake3.
commit 9d1c6748f594b90836d3aded3ffd15bc3c6461a5
Author: SmileTheory <SmileTheory at gmail.com>
Date: Tue Aug 8 20:20:11 2017 -0700
OpenGL2: Force VAO usage on OpenGL 3.0+
---
code/renderergl2/tr_extensions.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/code/renderergl2/tr_extensions.c b/code/renderergl2/tr_extensions.c
index 8447608..e90f518 100644
--- a/code/renderergl2/tr_extensions.c
+++ b/code/renderergl2/tr_extensions.c
@@ -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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list