Commit Graph

25 Commits (b3d8ce904431a28530475366f68df27b0b987077)

Author SHA1 Message Date
Fredrik Höglund 2f87b7542f kwin/es: Resolve functions for GL_EXT_robustness 2013-05-21 00:22:57 +02:00
Fredrik Höglund adc581d2ab kwin: Resolve functions for GL_ARB_robustness
Only the subset of functions available in core contexts is resolved,
except for glGetnTexImageARB() and glGetnUniformivARB(), which are
not used by kwin.

Instead of setting the function pointers to NULL when the extension isn't
supported, kwin provides its own implementations that call the non-robust
versions of the functions.  This is so callers don't have to check if the
extension is supported before calling the functions.
2013-05-21 00:22:55 +02:00
Fredrik Höglund e65f717b47 kwin/es: Resolve functions for GL_EXT_map_buffer_range 2013-05-08 18:36:50 +02:00
Fredrik Höglund b6585c2d8b kwin/es: Resolve functions for GL_OES_mapbuffer 2013-05-08 18:36:45 +02:00
Fredrik Höglund 11b9323f3d kwin: Resolve functions for GL_ARB_map_buffer_range 2013-05-08 18:36:38 +02:00
Fredrik Höglund 08d3b6cc3a kwin: Resolve more functions from ARB_vertex_buffer_object
This patch resolves:
    glMapBuffer()
    glUnmapBuffer()
    glBufferSubData()
    glGetBufferSubData()
2013-05-08 18:36:04 +02:00
Fredrik Höglund e0003db385 kwin: Resolve functions for GL_EXT_gpu_shader4 2013-05-08 18:33:02 +02:00
Fredrik Höglund 2bcad53bbb kwin: Resolve functions for GL_ARB_vertex_array_object 2013-05-08 18:33:02 +02:00
Fredrik Höglund 5b80d8d513 kwin: Fix shader function resolution for core contexts 2013-05-08 18:33:02 +02:00
Fredrik Höglund cb81e11375 kwin: Fix FBO function resolution for core contexts 2013-05-08 18:33:02 +02:00
Fredrik Höglund 855a7cc897 kwin: Fix glActiveTexture() resolution for core contexts 2013-05-08 18:33:02 +02:00
Fredrik Höglund 1bcf95f3f9 kwin: Fix VBO function resolution for core contexts
Mesa doesn't advertise extensions that were core in 1.5 in an OpenGL
context that uses the core profile.
2013-05-08 18:33:02 +02:00
Fredrik Höglund aab026af93 kwin: Resolve functions for GLX_ARB_create_context 2013-05-08 18:12:43 +02:00
Ralf Jung 96bc979ca8 Fix buffer swap prototypes
BUG: 309647
REVIEW: 107302
2012-11-18 12:50:31 +01:00
Martin Gräßlin 476adac337 Do not resolve glx functions specified in GLX 1.3
According to the OpenGL ABI for Linux GLX 1.3 is a minimum requirement.
Therefore we do not need to resolve the symbols which are present in that
version.

KWin did always require at least 1.3, for all the resolved functions
there were checks in the Scene, but they might have been incorrect.
Instead now the GLX version is checked and OpenGL compositing is blocked
if there is not at least GLX 1.3.

REVIEW: 106704
2012-10-04 17:17:51 +02:00
Martin Gräßlin 15d714d82c Do not resolve glBlendColor
glBlendColor has been added to OpenGL 1.2 which means it is part of
the OpenGL ABI defined for Linux.

See http://www.opengl.org/registry/ABI/ section 3.4.
2012-10-04 17:17:45 +02:00
Martin Gräßlin cf35c26396 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.
2012-10-04 17:17:45 +02:00
Martin Gräßlin a401558a43 Provide OpenGL over Egl
The Egl backend is decoupled from the OpenGL ES build option which makes
it possible to use it as a replacement for glx.

To make this possible a new build flag is added when egl is available at
compile time and any egl specific code is now ifdefed with this flag
instead of the gles flag. In addition at runtime a windowing system enum
value is passed to the various detect methods to have egl/glx specific
detection for e.g. function pointer resolving.

By default egl is used if compiled with OpenGL ES, otherwise glx is used.
But in the non-gles case the windowing system can be selected through the
new environment variable KWIN_OPENGL_INTERFACE. Setting this variable to
"egl" the EglOnXBackend is used.

REVIEW: 106632
2012-10-04 17:17:01 +02:00
Thomas Lübking fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
Fredrik Höglund 965feeb9f3 kwin: fix glBlitFramebuffer resolution
This function is also provided by GL_ARB_framebuffer_object.
2011-11-09 18:03:10 +01:00
Pierre-Loup A. Griffais 2570e9ec61 kwin-gles: add support for EGL_NV_post_sub_buffer
The EGL path had no support for presenting sub-regions of the screen, we can
leverage EGL_NV_post_sub_buffer for that. This wouldn't be a win if we didn't
have to opt-out of flipping.

REVIEW: 102889
2011-10-17 20:27:23 +02:00
Pierre-Loup A. Griffais 5971daf1c6 kwin-gles: check for EGL_image OR EGL_image_base + EGL_image_pixmap
EGL_KHR_image is a functional superset of both EGL_KHR_image_base and
EGL_KHR_image_pixmap, which were split off later to allow the former to be
more modular. Older drivers might only expose EGL_KHR_image if they were
released before the split happened.

REVIEW: 102879
2011-10-17 20:25:36 +02:00
Martin Gräßlin 225c362a04 Add support for framebuffer blit extension
Resolving of blit function and method in GLRenderTarget to blit
from the framebuffer to the RenderTarget.

REVIEW: 102354
2011-08-20 10:58:27 +02:00
Martin Gräßlin f5a187d224 Remove KWIN_HAVE_OPENGL from kwingl(es)utils
Yes building an OpenGL support library requires OpenGL...
2011-08-13 16:46:43 +02:00
Martin Gräßlin 57d11c134a Move kwineffects library into own directory
Second part of cleaning up the lib directory: the effects library
now lives in libkwineffects/ directory.

For existing effects nothing changes as the install path is unchanged.
The change obsoletes the lib/ directory.

As glplatform.h has not yet been exported I dared to export it and
adjust the places where it is used.
CCMAIL: kwin@kde.org
2011-02-19 10:01:31 +01:00