http://bugs.winehq.org/show_bug.cgi?id=6979
ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
------- Additional Comments From ken@codeweavers.com 2007-19-01 15:53 ------- What's happening is that the extensions string WineGLInfo.glExtensions that is queried at dlls/winex11.drv/opengl.c:308 goes invalid by the time it is analyzed at dlls/winex11.drv/opengl.c:2976.
The results of glGetString are documented as being static strings. However, the string is being released. I have verified by adding traces that the string pointer address has not changed.
I think the issue is that the set of supported extensions is dependent on the context. Therefore, the extensions string is only meaningful while the context on which it was queried is still valid. In Apple's OpenGL implementation, the extensions string is in fact not static, it lives only as long as the context.
I know of a solution, but I don't trust myself because I haven't traced through the code thoroughly. The solution is to just strdup the extensions string when it's originally queried. My problem is this: if the context is being destroyed and another is being created, are we sure the extensions are still the same for the new context? Shouldn't the code be structured such that the extensions which are analyzed are those that have been queried from the *actual current* context?