[fpc-pascal] glGetString crash

Jonas Maebe jonas at freepascal.org
Tue Feb 20 08:07:29 CET 2018

Ryan Joseph wrote:
>> On Feb 20, 2018, at 4:24 AM, Jonas Maebe  wrote:
>> My guess is that the Load_GL_VERSION_3_3x() function is broken since it appears to call glGetString before a context has been created, and that it just happens to work on some (most?) implementations by pure chance.
> After a context is created Load_GL_VERSION_3_3 returns false on my 2015 MacBook Pro. Load_GL_VERSION_3_2 returns true but glGetError returns GL_INVALID_ENUM directly after calling it. My system has all extensions for 3.3 so that function is indeed broken.

The brokenness I referred to stemmed from the fact that it calls
glGetString before a context has been created (unless you are only
supposed to call it after creating a context, but that seems rather
weird since afaik you create a context for a particular OpenGL version).

If you first create a context and it then still returns false, it may
also mean that you did not create the context properly.


More information about the fpc-pascal mailing list