[PATCH 3/5] opengl32: Fix extension checks on OpenGL core profile contexts.

Henri Verbeet hverbeet at gmail.com
Mon Jan 5 14:17:41 CST 2015


On 5 January 2015 at 20:19, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> 2015-01-05 18:33 GMT+01:00 Henri Verbeet <hverbeet at gmail.com>:
>> If I'm reading this correctly, this effectively ignores
>> DisabledExtensions for anything newer than GL 3.0. (And at least as
>> far as wglGetProcAddress() is concerned it affects both compatibility
>> and core contexts.)
>
> Hmm, it should still work via filter_extensions().
wglGetProcAddress() calls is_extension_supported(), which calls
has_extension(NULL, ...) if major >= 3, so it doesn't go through
filter_extensions().

Most applications probably won't care, but in principle applications
can use wglGetProcAddress() to check if a function is supported. (As
opposed to glXGetProcAddress() that's allowed to return non-NULL for
unsupported functions.)

>> As an aside, note that winex11.drv also uses
>> "glGetString(GL_EXTENSIONS);" in X11DRV_WineGL_InitOpenglInfo().
>
> That should be fine, that's always a compatibility context created
> with glXCreateContext().
Right, although in a way that's worse; extensions supported in
compatibility contexts aren't necessarily also supported in core
contexts. The only reason it will probably work in practice is because
of the details of the extensions being checked against that list.



More information about the wine-devel mailing list