diff --git a/raylib/cgo_darwin.go b/raylib/cgo_darwin.go index 111df77..ce68341 100644 --- a/raylib/cgo_darwin.go +++ b/raylib/cgo_darwin.go @@ -23,6 +23,10 @@ package rl #include "external/glfw/src/egl_context.c" #include "external/glfw/src/osmesa_context.c" +GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) { + return GLFW_TRUE; +} + #cgo darwin LDFLAGS: -framework Cocoa -framework IOKit -framework CoreVideo -framework CoreFoundation #cgo darwin CFLAGS: -x objective-c -Iexternal/glfw/include -D_GLFW_COCOA -D_GLFW_USE_CHDIR -D_GLFW_USE_MENUBAR -D_GLFW_USE_RETINA -Wno-deprecated-declarations -Wno-implicit-const-int-float-conversion -DPLATFORM_DESKTOP diff --git a/raylib/cgo_freebsd.go b/raylib/cgo_freebsd.go index 72f5b45..8b71e4d 100644 --- a/raylib/cgo_freebsd.go +++ b/raylib/cgo_freebsd.go @@ -12,17 +12,10 @@ package rl #include "external/glfw/src/vulkan.c" #include "external/glfw/src/window.c" -#ifdef _GLFW_WAYLAND -#include "external/glfw/src/wl_init.c" -#include "external/glfw/src/wl_monitor.c" -#include "external/glfw/src/wl_window.c" -#endif -#ifdef _GLFW_X11 #include "external/glfw/src/x11_init.c" #include "external/glfw/src/x11_monitor.c" #include "external/glfw/src/x11_window.c" #include "external/glfw/src/glx_context.c" -#endif #include "external/glfw/src/null_joystick.c" #include "external/glfw/src/posix_module.c" @@ -33,17 +26,15 @@ package rl #include "external/glfw/src/egl_context.c" #include "external/glfw/src/osmesa_context.c" -#cgo freebsd CFLAGS: -I. -I/usr/local/include -Iexternal/glfw/include -DPLATFORM_DESKTOP -#cgo freebsd LDFLAGS: -L/usr/local/lib +GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) { + return GLFW_TRUE; +} -#cgo freebsd,!wayland LDFLAGS: -lm -pthread -ldl -lrt -lX11 -#cgo freebsd,wayland LDFLAGS: -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon +#cgo freebsd CFLAGS: -I. -I/usr/local/include -Iexternal/glfw/include -DPLATFORM_DESKTOP -D_GLFW_X11 +#cgo freebsd LDFLAGS: -L/usr/local/lib -lm -pthread -ldl -lrt -lX11 #cgo freebsd,!es2,!es3 LDFLAGS: -lGL -#cgo freebsd,!wayland CFLAGS: -D_GLFW_X11 -#cgo freebsd,wayland CFLAGS: -D_GLFW_WAYLAND - #cgo freebsd,opengl11,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_11 #cgo freebsd,opengl21,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_21 #cgo freebsd,opengl43,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_43 diff --git a/raylib/cgo_linux.go b/raylib/cgo_linux.go index 237a77a..cfaabaf 100644 --- a/raylib/cgo_linux.go +++ b/raylib/cgo_linux.go @@ -12,17 +12,14 @@ package rl #include "external/glfw/src/vulkan.c" #include "external/glfw/src/window.c" -#ifdef _GLFW_WAYLAND #include "external/glfw/src/wl_init.c" #include "external/glfw/src/wl_monitor.c" #include "external/glfw/src/wl_window.c" -#endif -#ifdef _GLFW_X11 + #include "external/glfw/src/x11_init.c" #include "external/glfw/src/x11_monitor.c" #include "external/glfw/src/x11_window.c" #include "external/glfw/src/glx_context.c" -#endif #include "external/glfw/src/linux_joystick.c" #include "external/glfw/src/posix_module.c" @@ -33,16 +30,15 @@ package rl #include "external/glfw/src/egl_context.c" #include "external/glfw/src/osmesa_context.c" -#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP -Wno-stringop-overflow +GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) { + return GLFW_TRUE; +} -#cgo linux,!wayland LDFLAGS: -lm -pthread -ldl -lrt -lX11 -#cgo linux,wayland LDFLAGS: -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon +#cgo linux CFLAGS: -Iexternal/glfw/include -DPLATFORM_DESKTOP -D_GLFW_WAYLAND -D_GLFW_X11 -Wno-stringop-overflow +#cgo linux LDFLAGS: -lm -pthread -ldl -lrt -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon #cgo linux,!es2,!es3 LDFLAGS: -lGL -#cgo linux,!wayland CFLAGS: -D_GLFW_X11 -#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND - #cgo linux,opengl11,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_11 #cgo linux,opengl21,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_21 #cgo linux,opengl43,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_43 diff --git a/raylib/cgo_openbsd.go b/raylib/cgo_openbsd.go index 970d09b..ce5244d 100644 --- a/raylib/cgo_openbsd.go +++ b/raylib/cgo_openbsd.go @@ -12,17 +12,10 @@ package rl #include "external/glfw/src/vulkan.c" #include "external/glfw/src/window.c" -#ifdef _GLFW_WAYLAND -#include "external/glfw/src/wl_init.c" -#include "external/glfw/src/wl_monitor.c" -#include "external/glfw/src/wl_window.c" -#endif -#ifdef _GLFW_X11 #include "external/glfw/src/x11_init.c" #include "external/glfw/src/x11_monitor.c" #include "external/glfw/src/x11_window.c" #include "external/glfw/src/glx_context.c" -#endif #include "external/glfw/src/null_joystick.c" #include "external/glfw/src/posix_module.c" @@ -33,17 +26,15 @@ package rl #include "external/glfw/src/egl_context.c" #include "external/glfw/src/osmesa_context.c" -#cgo openbsd CFLAGS: -I. -I/usr/X11R6/include -Iexternal/glfw/include -DPLATFORM_DESKTOP -#cgo openbsd LDFLAGS: -L/usr/X11R6/lib +GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) { + return GLFW_TRUE; +} -#cgo openbsd,!wayland LDFLAGS: -lm -pthread -lX11 -#cgo openbsd,wayland LDFLAGS: -lm -pthread -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon +#cgo openbsd CFLAGS: -I. -I/usr/X11R6/include -Iexternal/glfw/include -DPLATFORM_DESKTOP -D_GLFW_X11 +#cgo openbsd LDFLAGS: -L/usr/X11R6/lib -lm -pthread -lX11 #cgo openbsd,!es2,!es3 LDFLAGS: -lGL -#cgo openbsd,!wayland CFLAGS: -D_GLFW_X11 -#cgo openbsd,wayland CFLAGS: -D_GLFW_WAYLAND - #cgo openbsd,opengl11,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_11 #cgo openbsd,opengl21,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_21 #cgo openbsd,opengl43,!es2,!es3 CFLAGS: -DGRAPHICS_API_OPENGL_43 diff --git a/raylib/cgo_windows.go b/raylib/cgo_windows.go index 3c71c31..41d1761 100644 --- a/raylib/cgo_windows.go +++ b/raylib/cgo_windows.go @@ -23,8 +23,12 @@ package rl #include "external/glfw/src/egl_context.c" #include "external/glfw/src/osmesa_context.c" +GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform) { + return GLFW_TRUE; +} + #cgo windows LDFLAGS: -lgdi32 -lwinmm -lole32 -#cgo windows CFLAGS: -D_GLFW_WIN32 -Iexternal -Iexternal/glfw/include -Iexternal/glfw/deps/mingw -DPLATFORM_DESKTOP -Wno-stringop-overflow +#cgo windows CFLAGS: -Iexternal -Iexternal/glfw/include -DPLATFORM_DESKTOP -D_GLFW_WIN32 -Wno-stringop-overflow #cgo windows,!es2,!es3 LDFLAGS: -lopengl32