Skip to content

Commit

Permalink
LWJGL CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Jul 23, 2024
1 parent e41cbeb commit 635b57f
Show file tree
Hide file tree
Showing 29 changed files with 582 additions and 370 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
* -text
*.bin binary diff=hex

*.c eol=lf
*.cpp eol=lf
*.h eol=lf
Expand Down
386 changes: 386 additions & 0 deletions .github/workflows/lwjgl.yml

Large diffs are not rendered by default.

211 changes: 0 additions & 211 deletions .github/workflows/main.yml

This file was deleted.

3 changes: 3 additions & 0 deletions 3rdparty/dear-imgui/imgui_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6566,6 +6566,9 @@ void ImGui::ShowAboutWindow(bool* p_open)
#ifdef __linux__
ImGui::Text("define: __linux__");
#endif
#ifdef __FreeBSD__
ImGui::Text("define: __FreeBSD__");
#endif
#ifdef __APPLE__
ImGui::Text("define: __APPLE__");
#endif
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/glsl-optimizer/src/mesa/main/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ extern "C" {
* For now, only used by some DRI hardware drivers for color/texel packing.
*/
#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#if defined(__linux__)
#if defined(__linux__) || defined(__FreeBSD__)
#include <byteswap.h>
#define CPU_TO_LE32( x ) bswap_32( x )
#elif defined(__APPLE__)
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/renderdoc/renderdoc_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER)
#define RENDERDOC_CC __cdecl
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
#define RENDERDOC_CC
#elif defined(__APPLE__)
#define RENDERDOC_CC
Expand Down
2 changes: 1 addition & 1 deletion examples/common/entry/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ bool openFileSelectionDialog(
char tmp[4096];
bx::StaticMemoryBlockWriter writer(tmp, sizeof(tmp) );

#if BX_PLATFORM_LINUX
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
bx::write(&writer, &err
, "--file-selection%s --title \"%.*s\" --filename \"%s\""
, FileSelectionDialogType::Save == _type ? " --save" : ""
Expand Down
10 changes: 5 additions & 5 deletions examples/common/entry/entry_glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# error "GLFW 3.2 or later is required"
#endif // GLFW_VERSION_MINOR < 2

#if BX_PLATFORM_LINUX
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
# include <wayland-egl.h>
# define GLFW_EXPOSE_NATIVE_WAYLAND
Expand Down Expand Up @@ -44,7 +44,7 @@ namespace entry
{
static void* glfwNativeWindowHandle(GLFWwindow* _window)
{
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
wl_egl_window *win_impl = (wl_egl_window*)glfwGetWindowUserPointer(_window);
if(!win_impl)
Expand Down Expand Up @@ -72,7 +72,7 @@ namespace entry
{
if(!_window)
return;
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
wl_egl_window *win_impl = (wl_egl_window*)glfwGetWindowUserPointer(_window);
if(win_impl)
Expand Down Expand Up @@ -864,7 +864,7 @@ namespace entry

void* getNativeDisplayHandle()
{
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
return glfwGetWaylandDisplay();
# else
Expand All @@ -877,7 +877,7 @@ namespace entry

bgfx::NativeWindowHandleType::Enum getNativeWindowHandleType()
{
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
return bgfx::NativeWindowHandleType::Wayland;
# else
Expand Down
10 changes: 5 additions & 5 deletions examples/common/entry/entry_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#if ENTRY_CONFIG_USE_SDL

#if BX_PLATFORM_LINUX
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
# include <wayland-egl.h>
# endif
Expand Down Expand Up @@ -48,7 +48,7 @@ namespace entry
return NULL;
}

# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
if (wmi.subsystem == SDL_SYSWM_WAYLAND)
{
Expand Down Expand Up @@ -81,7 +81,7 @@ namespace entry
{
if(!_window)
return;
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
wl_egl_window *win_impl = (wl_egl_window*)SDL_GetWindowData(_window, "wl_egl_window");
if(win_impl)
Expand Down Expand Up @@ -1088,7 +1088,7 @@ namespace entry
{
return NULL;
}
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
if (wmi.subsystem == SDL_SYSWM_WAYLAND)
return wmi.info.wl.display;
Expand All @@ -1108,7 +1108,7 @@ namespace entry
{
return bgfx::NativeWindowHandleType::Default;
}
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if ENTRY_CONFIG_USE_WAYLAND
if (wmi.subsystem == SDL_SYSWM_WAYLAND)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/common/entry/entry_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "entry_p.h"

#if ENTRY_CONFIG_USE_NATIVE && (BX_PLATFORM_LINUX || BX_PLATFORM_RPI)
#if ENTRY_CONFIG_USE_NATIVE && (BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_RPI)

#define XK_MISCELLANY
#define XK_LATIN1
Expand Down
Loading

0 comments on commit 635b57f

Please sign in to comment.