Revision cb7888f...

Go back to digest for 7th October 2012

Bug Fixes in KDE Base

Martin Gräßlin committed changes in [kde-workspace] kwin/libkwineffects/kwinglutils_funcs.cpp:

Rework the resolving of OpenGL function pointers

The macro GL_RESOLVE_WITH_EXT was fundamentally broken as it tried to
resolve a symbol first by it's name and then by the extension name if
the returned pointer is null.

>From GLX spec:
"A non-NULL return value for glXGetProcAddress does not guarantee that an
extension function is actually supported at runtime. The client must also query
glGetString(GL EXTENSIONS) or glXQueryExtensionsString to determine if an
extension is supported by a particular context."

This macro is now reworked to be used only in case the symbol name does
not match our function name. E.g. glUniform1f vs glUniform1fARB.

The resolving itself also had quite some issues as:
* in same cases function pointers are not nulled
* in same cases only the arb or only the ext is checked
* in same cases the wrong extension is checked

This is now reworked to always check first the ARB extension if available
then the EXT extension and if both are not available the pointers are set
to NULL.

File Changes

Modified 1 files
  • kwin/libkwineffects/kwinglutils_funcs.cpp
1 files changed in total