Load glGetString before trying to use it.

This commit is contained in:
bearoso 2018-05-29 16:20:54 -05:00 committed by GitHub
parent 2b4806b9ca
commit fb7c599bd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -3187,12 +3187,11 @@ int ogl_LoadFunctions()
{
int numFailed = 0;
ClearExtensionVars();
_ptrc_glGetString = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glGetString");
if(!_ptrc_glGetString) return ogl_LOAD_FAILED;
if (ogl_GetMajorVersion() < 3)
{
_ptrc_glGetString = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glGetString");
if(!_ptrc_glGetString) return ogl_LOAD_FAILED;
ProcExtsFromExtString((const char *)_ptrc_glGetString(GL_EXTENSIONS));
}
else