- fixed: gl_load.c did not handle the GL 2.x fallback for the lack of glGetStringi correctly, if that function was missing it just crashed.

This commit is contained in:
Christoph Oelckers 2016-04-30 17:16:16 +02:00
parent 8011958ebe
commit ca95371a27

View file

@ -2413,6 +2413,9 @@ static int ProcExtsFromExtList(void)
{
GLint iLoop;
GLint iNumExtensions = 0;
if (_ptrc_glGetStringi == NULL) return 0;
_ptrc_glGetIntegerv(GL_NUM_EXTENSIONS, &iNumExtensions);
for(iLoop = 0; iLoop < iNumExtensions; iLoop++)
@ -2432,8 +2435,7 @@ int ogl_LoadFunctions()
_ptrc_glGetIntegerv = (void (CODEGEN_FUNCPTR *)(GLenum, GLint *))IntGetProcAddress("glGetIntegerv");
if(!_ptrc_glGetIntegerv) return ogl_LOAD_FAILED;
_ptrc_glGetStringi = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glGetStringi");
if(!_ptrc_glGetStringi) return ogl_LOAD_FAILED;
if (0 == ProcExtsFromExtList())
{
_ptrc_glGetString = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glGetString");