Merge pull request #1683 from BlockoS/master
Renamed BGFX_USE_WAYLAND to ENTRY_CONFIG_USE_WAYLAND.
This commit is contained in:
commit
308a54c9c6
@ -15,7 +15,7 @@
|
||||
#endif // GLFW_VERSION_MINOR < 2
|
||||
|
||||
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
# include <wayland-egl.h>
|
||||
# define GLFW_EXPOSE_NATIVE_WAYLAND
|
||||
# else
|
||||
@ -45,7 +45,7 @@ namespace entry
|
||||
static void* glfwNativeWindowHandle(GLFWwindow* _window)
|
||||
{
|
||||
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
wl_egl_window *win_impl = (wl_egl_window*)glfwGetWindowUserPointer(_window);
|
||||
if(!win_impl)
|
||||
{
|
||||
@ -73,7 +73,7 @@ namespace entry
|
||||
if(!_window)
|
||||
return;
|
||||
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
wl_egl_window *win_impl = (wl_egl_window*)glfwGetWindowUserPointer(_window);
|
||||
if(win_impl)
|
||||
{
|
||||
@ -89,7 +89,7 @@ namespace entry
|
||||
{
|
||||
bgfx::PlatformData pd;
|
||||
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
pd.ndt = glfwGetWaylandDisplay();
|
||||
# else
|
||||
pd.ndt = glfwGetX11Display();
|
||||
|
@ -25,6 +25,10 @@
|
||||
# define ENTRY_CONFIG_USE_GLFW 0
|
||||
#endif // ENTRY_CONFIG_USE_GLFW
|
||||
|
||||
#ifndef ENTRY_CONFIG_USE_WAYLAND
|
||||
# define ENTRY_CONFIG_USE_WAYLAND 0
|
||||
#endif // ENTRY_CONFIG_USE_WAYLAND
|
||||
|
||||
#if !defined(ENTRY_CONFIG_USE_NATIVE) \
|
||||
&& !ENTRY_CONFIG_USE_NOOP \
|
||||
&& !ENTRY_CONFIG_USE_SDL \
|
||||
|
@ -8,7 +8,7 @@
|
||||
#if ENTRY_CONFIG_USE_SDL
|
||||
|
||||
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
# include <wayland-egl.h>
|
||||
# endif
|
||||
#elif BX_PLATFORM_WINDOWS
|
||||
@ -49,7 +49,7 @@ namespace entry
|
||||
}
|
||||
|
||||
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
wl_egl_window *win_impl = (wl_egl_window*)SDL_GetWindowData(_window, "wl_egl_window");
|
||||
if(!win_impl)
|
||||
{
|
||||
@ -85,7 +85,7 @@ namespace entry
|
||||
|
||||
bgfx::PlatformData pd;
|
||||
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
pd.ndt = wmi.info.wl.display;
|
||||
# else
|
||||
pd.ndt = wmi.info.x11.display;
|
||||
@ -112,7 +112,7 @@ namespace entry
|
||||
if(!_window)
|
||||
return;
|
||||
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
|
||||
# if BGFX_USE_WAYLAND
|
||||
# if ENTRY_CONFIG_USE_WAYLAND
|
||||
wl_egl_window *win_impl = (wl_egl_window*)SDL_GetWindowData(_window, "wl_egl_window");
|
||||
if(win_impl)
|
||||
{
|
||||
|
@ -88,6 +88,12 @@ project ("example-common")
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["with-wayland"] then
|
||||
defines {
|
||||
"ENTRY_CONFIG_USE_WAYLAND=1",
|
||||
}
|
||||
end
|
||||
|
||||
configuration { "linux-steamlink" }
|
||||
defines {
|
||||
"EGL_API_FB",
|
||||
|
@ -121,9 +121,7 @@ function copyLib()
|
||||
end
|
||||
|
||||
if _OPTIONS["with-wayland"] then
|
||||
defines { "BGFX_USE_WAYLAND=1" }
|
||||
else
|
||||
defines { "BGFX_USE_WAYLAND=0" }
|
||||
defines { "WL_EGL_PLATFORM=1" }
|
||||
end
|
||||
|
||||
if _OPTIONS["with-sdl"] then
|
||||
|
@ -8,10 +8,6 @@
|
||||
|
||||
#if BGFX_USE_EGL
|
||||
|
||||
#if BGFX_USE_WAYLAND
|
||||
#include <wayland-egl.h>
|
||||
#endif
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#if defined(Success)
|
||||
|
Loading…
x
Reference in New Issue
Block a user