Merge branch 'raysan5:master' into gltf-ushort-vec4

This commit is contained in:
Gary M 2024-02-24 07:43:43 -08:00 committed by GitHub
commit af4dab221a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 11 additions and 8 deletions

View File

@ -2,7 +2,7 @@
include(CMakeDependentOption)
include(EnumOption)
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM" "Platform to build for.")
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM;SDL" "Platform to build for.")
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")

View File

@ -91,6 +91,11 @@ elseif ("${PLATFORM}" MATCHES "DRM")
endif ()
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
elseif ("${PLATFORM}" MATCHES "SDL")
find_package(SDL2 REQUIRED)
set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL")
set(LIBS_PRIVATE SDL2::SDL2)
endif ()
if (NOT ${OPENGL_VERSION} MATCHES "OFF")

View File

@ -71,8 +71,8 @@ USE_EXTERNAL_GLFW ?= FALSE
# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
# WARNING: Library is not included in raylib, it MUST be configured by users
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2-2.28.4/include
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2-2.28.4/lib/x64
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
# Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
# NOTE: This variable is only used for PLATFORM_OS: LINUX

View File

@ -55,7 +55,6 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: anytype, optim
exe.linkSystemLibrary("winmm");
exe.linkSystemLibrary("gdi32");
exe.linkSystemLibrary("opengl32");
exe.addIncludePath(.{ .path = "external/glfw/deps/mingw" });
exe.defineCMacro("PLATFORM_DESKTOP", null);
},

View File

@ -13,7 +13,7 @@
#include "raylib.h"
#define NUM_TEXTURES 9 // Currently we have 8 generation algorithms but some are have multiple purposes (Linear and Square Gradients)
#define NUM_TEXTURES 9 // Currently we have 8 generation algorithms but some have multiple purposes (Linear and Square Gradients)
//------------------------------------------------------------------------------------
// Program main entry point

View File

@ -438,7 +438,7 @@ INCLUDE_PATHS = -I.
# Define additional directories containing required header files
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
INCLUDE_PATHS += -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
INCLUDE_PATHS += -Iexternal/glfw/include
ifeq ($(PLATFORM_OS),BSD)
INCLUDE_PATHS += -I/usr/local/include
endif
@ -447,7 +447,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP_SDL)
INCLUDE_PATHS += -I$(SDL_INCLUDE_PATH)
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
INCLUDE_PATHS += -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
INCLUDE_PATHS += -Iexternal/glfw/include
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
INCLUDE_PATHS += -I/usr/include/libdrm

View File

@ -97,7 +97,6 @@ pub fn addRaylib(b: *std.Build, target: anytype, optimize: std.builtin.OptimizeM
raylib.linkSystemLibrary("winmm");
raylib.linkSystemLibrary("gdi32");
raylib.linkSystemLibrary("opengl32");
raylib.addIncludePath(.{ .path = "external/glfw/deps/mingw" });
raylib.defineCMacro("PLATFORM_DESKTOP", null);
},