Skip to content

Commit 2a7ecf5

Browse files
authored
Merge branch 'raysan5:master' into rlsw
2 parents 5ee7f77 + 688a81d commit 2a7ecf5

File tree

171 files changed

+1181
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+1181
-274
lines changed

BINDINGS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
7171
| [raylib-rs](https://github.com/raylib-rs/raylib-rs) | **5.5** | [Rust](https://www.rust-lang.org) | Zlib |
7272
| [raylib-ruby](https://github.com/wilsonsilva/raylib-ruby) | 4.5 | [Ruby](https://www.ruby-lang.org) | Zlib |
7373
| [Relib](https://github.com/RedCubeDev-ByteSpace/Relib) | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | **???** |
74-
| [racket-raylib](https://github.com/eutro/racket-raylib) | 4.0 | [Racket](https://racket-lang.org) | MIT/Apache-2.0 |
74+
| [racket-raylib](https://github.com/eutro/racket-raylib) | **5.5** | [Racket](https://racket-lang.org) | MIT/Apache-2.0 |
7575
| [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT |
7676
| [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT |
7777
| [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.5** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 |

ROADMAP.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
Here is a wishlist with features and ideas to improve the library. Note that features listed here are usually long term improvements or just describe a route to follow for the library. There are also some additional places to look for raylib improvements and ideas:
44

55
- [GitHub Issues](https://github.com/raysan5/raylib/issues) has several open issues for possible improvements or bugs to fix.
6+
- [GitHub PRs](https://github.com/raysan5/raylib/pulls) open with improvements to be reviewed.
67
- [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has multiple *TODO* comments around code with pending things to review or improve.
78
- raylib wishlists discussions are open to everyone to ask for improvements, feel free to check and comment:
8-
- [raylib wishlist 2021](https://github.com/raysan5/raylib/discussions/1502)
9-
- [raylib wishlist 2022](https://github.com/raysan5/raylib/discussions/2272)
9+
- [raylib 6.0 wishlist](https://github.com/raysan5/raylib/discussions/4660)
1010
- [raylib 5.0 wishlist](https://github.com/raysan5/raylib/discussions/2952)
11-
11+
- [raylib wishlist 2022](https://github.com/raysan5/raylib/discussions/2272)
12+
- [raylib wishlist 2021](https://github.com/raysan5/raylib/discussions/1502)
13+
1214
_Current version of raylib is complete and functional but there is always room for improvements._
1315

1416
**raylib 5.x**
15-
- [ ] `rcore`: Support additional platforms: iOS, Xbox Series S|X
17+
- [ ] `rcore`: Support additional platforms: iOS, consoles?
1618
- [ ] `rcore_web`: Avoid GLFW dependency, functionality can be directly implemented using emscripten SDK
1719
- [ ] `rlgl`: Review GLSL shaders naming conventions for consistency
1820
- [ ] `textures`: Improve compressed textures support, loading and saving

build.zig

+17-20
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
192192
setDesktopPlatform(raylib, options.platform);
193193
},
194194
.linux => {
195-
196195
if (options.platform == .drm) {
197196
if (options.opengl_version == .auto) {
198197
raylib.linkSystemLibrary("GLESv2");
@@ -209,34 +208,32 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
209208
} else if (target.result.abi == .android) {
210209

211210
//these are the only tag options per https://developer.android.com/ndk/guides/other_build_systems
212-
const hostTuple = switch(builtin.target.os.tag) {
213-
.linux => "linux-x86_64",
211+
const hostTuple = switch (builtin.target.os.tag) {
212+
.linux => "linux-x86_64",
214213
.windows => "windows-x86_64",
215-
.macos => "darwin-x86_64",
216-
else => {
217-
@panic("unsupported host OS");
218-
}
214+
.macos => "darwin-x86_64",
215+
else => @panic("unsupported host OS"),
219216
};
220217

221218
const androidTriple = try target.result.linuxTriple(b.allocator);
222219
const androidNdkPathString: []const u8 = options.android_ndk;
223-
if(androidNdkPathString.len < 1) @panic("no ndk path provided and ANDROID_NDK_HOME is not set");
220+
if (androidNdkPathString.len < 1) @panic("no ndk path provided and ANDROID_NDK_HOME is not set");
224221
const androidApiLevel: []const u8 = options.android_api_version;
225222

226-
const androidSysroot = try std.fs.path.join(b.allocator, &.{androidNdkPathString, "/toolchains/llvm/prebuilt/", hostTuple, "/sysroot"});
227-
const androidLibPath = try std.fs.path.join(b.allocator, &.{androidSysroot, "/usr/lib/", androidTriple});
228-
const androidApiSpecificPath = try std.fs.path.join(b.allocator, &.{androidLibPath, androidApiLevel});
229-
const androidIncludePath = try std.fs.path.join(b.allocator, &.{androidSysroot, "/usr/include"});
230-
const androidArchIncludePath = try std.fs.path.join(b.allocator, &.{androidIncludePath, androidTriple});
231-
const androidAsmPath = try std.fs.path.join(b.allocator, &.{androidIncludePath, "/asm-generic"});
232-
const androidGluePath = try std.fs.path.join(b.allocator, &.{androidNdkPathString, "/sources/android/native_app_glue/"});
223+
const androidSysroot = try std.fs.path.join(b.allocator, &.{ androidNdkPathString, "/toolchains/llvm/prebuilt/", hostTuple, "/sysroot" });
224+
const androidLibPath = try std.fs.path.join(b.allocator, &.{ androidSysroot, "/usr/lib/", androidTriple });
225+
const androidApiSpecificPath = try std.fs.path.join(b.allocator, &.{ androidLibPath, androidApiLevel });
226+
const androidIncludePath = try std.fs.path.join(b.allocator, &.{ androidSysroot, "/usr/include" });
227+
const androidArchIncludePath = try std.fs.path.join(b.allocator, &.{ androidIncludePath, androidTriple });
228+
const androidAsmPath = try std.fs.path.join(b.allocator, &.{ androidIncludePath, "/asm-generic" });
229+
const androidGluePath = try std.fs.path.join(b.allocator, &.{ androidNdkPathString, "/sources/android/native_app_glue/" });
233230

234-
raylib.addLibraryPath(.{ .cwd_relative = androidLibPath});
231+
raylib.addLibraryPath(.{ .cwd_relative = androidLibPath });
235232
raylib.root_module.addLibraryPath(.{ .cwd_relative = androidApiSpecificPath });
236233
raylib.addSystemIncludePath(.{ .cwd_relative = androidIncludePath });
237-
raylib.addSystemIncludePath(.{ .cwd_relative = androidArchIncludePath});
238-
raylib.addSystemIncludePath( .{ .cwd_relative = androidAsmPath});
239-
raylib.addSystemIncludePath(.{ .cwd_relative = androidGluePath});
234+
raylib.addSystemIncludePath(.{ .cwd_relative = androidArchIncludePath });
235+
raylib.addSystemIncludePath(.{ .cwd_relative = androidAsmPath });
236+
raylib.addSystemIncludePath(.{ .cwd_relative = androidGluePath });
240237

241238
var libcData = std.ArrayList(u8).init(b.allocator);
242239
const writer = libcData.writer();
@@ -442,7 +439,7 @@ pub const PlatformBackend = enum {
442439
rgfw,
443440
sdl,
444441
drm,
445-
android
442+
android,
446443
};
447444

448445
pub fn build(b: *std.Build) !void {

examples/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ if (${PLATFORM} MATCHES "Android")
9090

9191
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_custom_uniform.c)
9292
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_model_shader.c)
93+
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_view_depth.c)
9394
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_postprocessing.c)
9495
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_raymarching.c)
9596
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_palette_switch.c)
9697
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
9798

9899
elseif (${PLATFORM} MATCHES "Web")
99-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
100+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
100101
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
101102
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1 -s ASYNCIFY -s ALLOW_MEMORY_GROWTH=1 --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
102103
set(CMAKE_EXECUTABLE_SUFFIX ".html")

examples/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ CFLAGS = -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
232232

233233
ifeq ($(BUILD_MODE),DEBUG)
234234
CFLAGS += -g -D_DEBUG
235-
else
235+
else
236236
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
237237
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
238238
CFLAGS += -O3
@@ -341,12 +341,12 @@ ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_R
341341
# --source-map-base # allow debugging in browser with source map
342342
# --shell-file shell.html # define a custom shell .html and output extension
343343
LDFLAGS += -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1 -sMINIFY_HTML=0
344-
344+
345345
# Using GLFW3 library (instead of RGFW)
346346
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
347347
LDFLAGS += -sUSE_GLFW=3
348348
endif
349-
349+
350350
# Build using asyncify
351351
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
352352
LDFLAGS += -sASYNCIFY
@@ -642,6 +642,7 @@ SHADERS = \
642642
shaders/shaders_texture_outline \
643643
shaders/shaders_texture_tiling \
644644
shaders/shaders_texture_waves \
645+
shaders/shaders_view_depth \
645646
shaders/shaders_write_depth \
646647
shaders/shaders_vertex_displacement
647648

@@ -652,6 +653,7 @@ AUDIO = \
652653
audio/audio_raw_stream \
653654
audio/audio_sound_loading \
654655
audio/audio_sound_multi \
656+
audio/audio_sound_positioning \
655657
audio/audio_stream_effects
656658

657659
OTHERS = \

examples/Makefile.Web

+7-2
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
278278
# --source-map-base # allow debugging in browser with source map
279279
# --shell-file shell.html # define a custom shell .html and output extension
280280
LDFLAGS += -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1 -sEXPORTED_RUNTIME_METHODS=ccall -sMINIFY_HTML=0
281-
281+
282282
# Using GLFW3 library (instead of RGFW)
283283
ifeq ($(PLATFORM),PLATFORM_WEB)
284284
LDFLAGS += -sUSE_GLFW=3
@@ -525,6 +525,7 @@ SHADERS = \
525525
shaders/shaders_texture_tiling \
526526
shaders/shaders_texture_waves \
527527
shaders/shaders_vertex_displacement \
528+
shaders/shaders_view_depth \
528529
shaders/shaders_write_depth
529530

530531
AUDIO = \
@@ -534,6 +535,7 @@ AUDIO = \
534535
audio/audio_raw_stream \
535536
audio/audio_sound_loading \
536537
audio/audio_sound_multi \
538+
audio/audio_sound_positioning \
537539
audio/audio_stream_effects
538540

539541
OTHERS = \
@@ -1150,6 +1152,10 @@ shaders/shaders_texture_waves: shaders/shaders_texture_waves.c
11501152
--preload-file shaders/resources/space.png@resources/space.png \
11511153
--preload-file shaders/resources/shaders/glsl100/wave.fs@resources/shaders/glsl100/wave.fs
11521154

1155+
shaders/shaders_view_depth: shaders/shaders_view_depth.c
1156+
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
1157+
--preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
1158+
11531159
shaders/shaders_write_depth: shaders/shaders_write_depth.c
11541160
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
11551161
--preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
@@ -1235,4 +1241,3 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
12351241
del *.o *.html *.js
12361242
endif
12371243
@echo Cleaning done
1238-

examples/README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ Examples using raylib shaders functionality, including shaders loading, paramete
201201
| 139 | [shaders_basic_pbr](shaders/shaders_basic_pbr.c) | <img src="shaders/shaders_basic_pbr.png" alt="shaders_basic_pbr" width="80"> | ⭐️⭐️⭐️⭐️ | 5.0 | 5.1-dev | [Afan OLOVCIC](https://github.com/_DevDad) |
202202
| 140 | [shaders_lightmap](shaders/shaders_lightmap.c) | <img src="shaders/shaders_lightmap.png" alt="shaders_lightmap" width="80"> | ⭐️⭐️⭐️☆ | 4.5 | 4.5 | [Jussi Viitala](https://github.com/nullstare) |
203203
| 141 | [shaders_rounded_rectangle](shaders/shaders_rounded_rectangle.c) | <img src="shaders/shaders_rounded_rectangle.png" alt="shaders_rounded_rectangle" width=80> | ⭐️⭐️⭐️☆ | 5.5 | 5.5 | [Anstro Pleuton](https://github.com/anstropleuton) |
204+
| 142 | [shaders_view_depth](shaders/shaders_view_depth.c) | <img src="shaders/shaders_view_depth.png" alt="shaders_view_depth" width="80"> | ⭐️⭐️⭐️☆ | 5.6-dev | 5.6-dev | [Luís Almeida](https://github.com/luis605) |
204205

205206
### category: audio
206207

@@ -215,19 +216,19 @@ Examples using raylib audio functionality, including sound/music loading and pla
215216
| 146 | [audio_mixed_processor](audio/audio_mixed_processor.c) | <img src="audio/audio_mixed_processor.png" alt="audio_mixed_processor" width="80"> | ⭐️⭐️⭐️⭐️ | 4.2 | 4.2 | [hkc](https://github.com/hatkidchan) |
216217
| 147 | [audio_stream_effects](audio/audio_stream_effects.c) | <img src="audio/audio_stream_effects.png" alt="audio_stream_effects" width="80"> | ⭐️⭐️⭐️⭐️ | 4.2 | 5.0 | [Ray](https://github.com/raysan5) |
217218
| 148 | [audio_sound_multi](audio/audio_sound_multi.c) | <img src="audio/audio_sound_multi.png" alt="audio_sound_multi" width="80"> | ⭐️⭐️☆☆ | 4.6 | 4.6 | [Jeffery Myers](https://github.com/JeffM2501) |
219+
| 149 | [audio_sound_positioning](audio/audio_sound_positioning.c) | <img src="audio/audio_sound_positioning.png" alt="audio_sound_positioning" width="80"> | ⭐️⭐️☆☆ | 5.5 | 5.5 | [Le Juez Victor](https://github.com/Bigfoot71) |
218220

219221
### category: others
220222

221223
Examples showing raylib misc functionality that does not fit in other categories, like standalone modules usage or examples integrating external libraries.
222224

223225
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
224226
|----|----------|--------|:-------------------:|:------------------:|:-----------------------:|:----------------------|
225-
| 149 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | 4.0 | [Ray](https://github.com/raysan5) |
226-
| 150 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | 4.0 | 4.0 | [Teddy Astie](https://github.com/tsnake41) |
227-
| 151 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
228-
| 152 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | 3.8 | 4.0 | [Stephan Soller](https://github.com/arkanis) |
229-
| 153 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.0 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
230-
| 154 | [raymath_vector_angle](others/raymath_vector_angle.c) | <img src="others/raymath_vector_angle.png" alt="raymath_vector_angle" width="80"> | ⭐️⭐️☆☆ | 1.0 | 4.6 | [Ray](https://github.com/raysan5) |
227+
| 150 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | 4.0 | [Ray](https://github.com/raysan5) |
228+
| 151 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | 4.0 | 4.0 | [Teddy Astie](https://github.com/tsnake41) |
229+
| 152 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
230+
| 153 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | 3.8 | 4.0 | [Stephan Soller](https://github.com/arkanis) |
231+
| 154 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.0 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
232+
| 155 | [raymath_vector_angle](others/raymath_vector_angle.c) | <img src="others/raymath_vector_angle.png" alt="raymath_vector_angle" width="80"> | ⭐️⭐️☆☆ | 1.0 | 4.6 | [Ray](https://github.com/raysan5) |
231233

232234
As always contributions are welcome, feel free to send new examples! Here is an [examples template](examples_template.c) to start with!
233-

0 commit comments

Comments
 (0)