Wayland support

Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al.

Additional changes in this commit, done by me:

* Wayland uses the common EGL framework
* EGL can now create a desktop OpenGL context
* testgl2 loads GL functions dynamically, no need to link to libGL anymore
* Assorted fixes to the Wayland backend

Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10,
running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections
This commit is contained in:
Gabriel Jacobo 2013-12-14 20:18:43 -03:00
parent b71add8edb
commit 3308d271b5
25 changed files with 2035 additions and 129 deletions

View file

@ -505,6 +505,29 @@ macro(CheckX11)
endif(VIDEO_X11)
endmacro(CheckX11)
# Requires:
# - EGL
macro(CheckWayland)
if(VIDEO_WAYLAND)
pkg_check_modules(WAYLAND wayland-client wayland-cursor wayland-egl egl xkbcommon)
if(WAYLAND_FOUND)
link_directories(
${WAYLAND_LIBRARY_DIRS}
)
include_directories(
${WAYLAND_INCLUDE_DIRS}
)
set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
set(HAVE_VIDEO_WAYLAND TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES})
set(SDL_VIDEO_DRIVER_WAYLAND 1)
endif(WAYLAND_FOUND)
endif(VIDEO_WAYLAND)
endmacro(CheckWayland)
# Requires:
# - n/a
#