mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 14:04:36 +00:00
parent
5b306f0390
commit
0e0862cfc7
@ -33,10 +33,11 @@ elseif (_GLFW_X11)
|
|||||||
endif()
|
endif()
|
||||||
elseif (_GLFW_WAYLAND)
|
elseif (_GLFW_WAYLAND)
|
||||||
set(glfw_HEADERS ${common_HEADERS} wl_platform.h linux_joystick.h
|
set(glfw_HEADERS ${common_HEADERS} wl_platform.h linux_joystick.h
|
||||||
posix_time.h posix_tls.h xkb_unicode.h egl_context.h)
|
posix_time.h posix_tls.h xkb_unicode.h egl_context.h
|
||||||
|
osmesa_context.h)
|
||||||
set(glfw_SOURCES ${common_SOURCES} wl_init.c wl_monitor.c wl_window.c
|
set(glfw_SOURCES ${common_SOURCES} wl_init.c wl_monitor.c wl_window.c
|
||||||
linux_joystick.c posix_time.c posix_tls.c xkb_unicode.c
|
linux_joystick.c posix_time.c posix_tls.c xkb_unicode.c
|
||||||
egl_context.c)
|
egl_context.c osmesa_context.c)
|
||||||
|
|
||||||
ecm_add_wayland_client_protocol(glfw_SOURCES
|
ecm_add_wayland_client_protocol(glfw_SOURCES
|
||||||
PROTOCOL
|
PROTOCOL
|
||||||
|
@ -51,6 +51,7 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
|
|||||||
#include "linux_joystick.h"
|
#include "linux_joystick.h"
|
||||||
#include "xkb_unicode.h"
|
#include "xkb_unicode.h"
|
||||||
#include "egl_context.h"
|
#include "egl_context.h"
|
||||||
|
#include "osmesa_context.h"
|
||||||
|
|
||||||
#include "wayland-relative-pointer-unstable-v1-client-protocol.h"
|
#include "wayland-relative-pointer-unstable-v1-client-protocol.h"
|
||||||
#include "wayland-pointer-constraints-unstable-v1-client-protocol.h"
|
#include "wayland-pointer-constraints-unstable-v1-client-protocol.h"
|
||||||
|
@ -395,10 +395,21 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
|
|
||||||
if (ctxconfig->client != GLFW_NO_API)
|
if (ctxconfig->client != GLFW_NO_API)
|
||||||
{
|
{
|
||||||
if (!_glfwInitEGL())
|
if (ctxconfig->source == GLFW_EGL_CONTEXT_API ||
|
||||||
return GLFW_FALSE;
|
ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
|
||||||
if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
|
{
|
||||||
return GLFW_FALSE;
|
if (!_glfwInitEGL())
|
||||||
|
return GLFW_FALSE;
|
||||||
|
if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
|
else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
|
||||||
|
{
|
||||||
|
if (!_glfwInitOSMesa())
|
||||||
|
return GLFW_FALSE;
|
||||||
|
if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wndconfig->title)
|
if (wndconfig->title)
|
||||||
|
Loading…
Reference in New Issue
Block a user