mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
validate that we actually have a proper implementation of GL_ARB_vertex_array_object, to avoid virtualbox crashes
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4128 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
670dadcecf
commit
b84d03a87c
1 changed files with 17 additions and 3 deletions
|
@ -797,6 +797,23 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name))
|
|||
}
|
||||
//we only use vao with shaders anyway.
|
||||
if (!gl_config.arb_shader_objects)
|
||||
{
|
||||
//don't bother if we've no glsl
|
||||
qglGenVertexArrays = NULL;
|
||||
qglBindVertexArray = NULL;
|
||||
}
|
||||
else if (gl_config.glversion >= 3)
|
||||
{
|
||||
/*yay core!*/
|
||||
qglGenVertexArrays = (void *)getglext("glGenVertexArrays");
|
||||
qglBindVertexArray = (void *)getglext("glBindVertexArray");
|
||||
}
|
||||
else if (GL_CheckExtension("GL_ARB_vertex_array_object"))
|
||||
{
|
||||
qglGenVertexArrays = (void *)getglext("glGenVertexArraysARB");
|
||||
qglBindVertexArray = (void *)getglext("glBindVertexArrayARB");
|
||||
}
|
||||
else
|
||||
{
|
||||
qglGenVertexArrays = NULL;
|
||||
qglBindVertexArray = NULL;
|
||||
|
@ -1460,9 +1477,6 @@ void GL_Init(void *(*getglfunction) (char *name))
|
|||
qglPopAttrib = (void *)getglcore("glPopAttrib");
|
||||
qglScissor = (void *)getglcore("glScissor");
|
||||
|
||||
qglGenVertexArrays = (void *)getglext("glGenVertexArrays");
|
||||
qglBindVertexArray = (void *)getglext("glBindVertexArray");
|
||||
|
||||
//does this need to be non-core as well?
|
||||
qglFogi = (void *)getglcore("glFogi");
|
||||
qglFogf = (void *)getglcore("glFogf");
|
||||
|
|
Loading…
Reference in a new issue