Skip to content

Commit

Permalink
LWJGL CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Nov 18, 2024
1 parent e9c9d71 commit 5d8eade
Show file tree
Hide file tree
Showing 30 changed files with 610 additions and 372 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 @@ -7734,6 +7734,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
8 changes: 4 additions & 4 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.4 or later is required"
#endif // GLFW_VERSION_*

#if BX_PLATFORM_LINUX
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# define GLFW_EXPOSE_NATIVE_WAYLAND
# define GLFW_EXPOSE_NATIVE_X11
# define GLFW_EXPOSE_NATIVE_GLX
Expand All @@ -40,7 +40,7 @@ namespace entry
{
static void* glfwNativeWindowHandle(GLFWwindow* _window)
{
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
if (GLFW_PLATFORM_WAYLAND == glfwGetPlatform() )
{
return glfwGetWaylandWindow(_window);
Expand Down Expand Up @@ -833,7 +833,7 @@ namespace entry

void* getNativeDisplayHandle()
{
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
if (GLFW_PLATFORM_WAYLAND == glfwGetPlatform() )
{
return glfwGetWaylandDisplay();
Expand All @@ -847,7 +847,7 @@ namespace entry

bgfx::NativeWindowHandleType::Enum getNativeWindowHandleType()
{
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
if (GLFW_PLATFORM_WAYLAND == glfwGetPlatform() )
{
return bgfx::NativeWindowHandleType::Wayland;
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 (wmi.subsystem == SDL_SYSWM_WAYLAND)
{
return (void*)wmi.info.wl.surface;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ namespace entry
{
return NULL;
}
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
if (wmi.subsystem == SDL_SYSWM_WAYLAND)
return wmi.info.wl.display;
else
Expand All @@ -1075,7 +1075,7 @@ namespace entry
{
return bgfx::NativeWindowHandleType::Default;
}
# if BX_PLATFORM_LINUX
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
if (wmi.subsystem == SDL_SYSWM_WAYLAND)
{
return bgfx::NativeWindowHandleType::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 5d8eade

Please sign in to comment.