[fpc-pascal] glGetString crash

Ryan Joseph genericptr at gmail.com
Mon Feb 19 03:21:32 CET 2018

Maybe SDL has a bug then because glGetString should never crash. 

When are the land Load_GL_VERSION_XXX functions meant to be called in the pipeline? I was calling them before the openGL context is created (which works except for 3.x on the old MacBook) but I just tried calling Load_GL_VERSION_3_0 after the context was created and I got some random errors from OpenGL functions (Load_GL_VERSION_2_1 in a legacy context did work however).

Either way calling Load_GL_VERSION_3_0 before the context is created works on my 2015 Mac but crashes in glGetString on the 2010. Not sure what to make of that.

> On Feb 19, 2018, at 12:41 AM, Jonas Maebe <jonas at freepascal.org> wrote:
> The crash is inside the glGetString function itself, so its pointer was loaded properly. That function is trying to load data from a null-pointer though, so maybe the OpenGL context was not initialised properly yet.

More information about the fpc-pascal mailing list