Skip to content

Commit

Permalink
LWJGL CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Oct 3, 2024
1 parent 3f9fe0d commit 355bbd3
Show file tree
Hide file tree
Showing 30 changed files with 609 additions and 371 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 @@ -7665,6 +7665,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
struct wl_surface* surface = (struct wl_surface*)glfwGetWaylandWindow(_window);
return (void*)surface;
Expand All @@ -62,7 +62,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 @@ -854,7 +854,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 @@ -867,7 +867,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
8 changes: 4 additions & 4 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
#elif BX_PLATFORM_WINDOWS
# define SDL_MAIN_HANDLED
#endif
Expand Down Expand Up @@ -45,7 +45,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 (void*)wmi.info.wl.surface;
Expand Down Expand Up @@ -1062,7 +1062,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 @@ -1082,7 +1082,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 355bbd3

Please sign in to comment.