Skip to content

Commit 19a1683

Browse files
committed
REXM: Updated examples
1 parent be6007b commit 19a1683

File tree

14 files changed

+1324
-42
lines changed

14 files changed

+1324
-42
lines changed

examples/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ SHAPES = \
583583
shapes/shapes_math_angle_rotation \
584584
shapes/shapes_math_sine_cosine \
585585
shapes/shapes_mouse_trail \
586+
shapes/shapes_penrose_tile \
586587
shapes/shapes_pie_chart \
587588
shapes/shapes_rectangle_advanced \
588589
shapes/shapes_rectangle_scaling \
@@ -602,6 +603,7 @@ TEXTURES = \
602603
textures/textures_background_scrolling \
603604
textures/textures_blend_modes \
604605
textures/textures_bunnymark \
606+
textures/textures_cellular_automata \
605607
textures/textures_fog_of_war \
606608
textures/textures_gif_player \
607609
textures/textures_image_channel \
@@ -640,6 +642,7 @@ TEXT = \
640642
text/text_input_box \
641643
text/text_rectangle_bounds \
642644
text/text_sprite_fonts \
645+
text/text_strings_management \
643646
text/text_unicode_emojis \
644647
text/text_unicode_ranges \
645648
text/text_words_alignment \
@@ -685,6 +688,7 @@ SHADERS = \
685688
shaders/shaders_depth_writing \
686689
shaders/shaders_eratosthenes_sieve \
687690
shaders/shaders_fog_rendering \
691+
shaders/shaders_game_of_life \
688692
shaders/shaders_hot_reloading \
689693
shaders/shaders_hybrid_rendering \
690694
shaders/shaders_julia_set \

examples/Makefile.Web

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ SHAPES = \
571571
shapes/shapes_math_angle_rotation \
572572
shapes/shapes_math_sine_cosine \
573573
shapes/shapes_mouse_trail \
574+
shapes/shapes_penrose_tile \
574575
shapes/shapes_pie_chart \
575576
shapes/shapes_rectangle_advanced \
576577
shapes/shapes_rectangle_scaling \
@@ -590,6 +591,7 @@ TEXTURES = \
590591
textures/textures_background_scrolling \
591592
textures/textures_blend_modes \
592593
textures/textures_bunnymark \
594+
textures/textures_cellular_automata \
593595
textures/textures_fog_of_war \
594596
textures/textures_gif_player \
595597
textures/textures_image_channel \
@@ -628,6 +630,7 @@ TEXT = \
628630
text/text_input_box \
629631
text/text_rectangle_bounds \
630632
text/text_sprite_fonts \
633+
text/text_strings_management \
631634
text/text_unicode_emojis \
632635
text/text_unicode_ranges \
633636
text/text_words_alignment \
@@ -673,6 +676,7 @@ SHADERS = \
673676
shaders/shaders_depth_writing \
674677
shaders/shaders_eratosthenes_sieve \
675678
shaders/shaders_fog_rendering \
679+
shaders/shaders_game_of_life \
676680
shaders/shaders_hot_reloading \
677681
shaders/shaders_hybrid_rendering \
678682
shaders/shaders_julia_set \
@@ -934,6 +938,9 @@ shapes/shapes_math_sine_cosine: shapes/shapes_math_sine_cosine.c
934938
shapes/shapes_mouse_trail: shapes/shapes_mouse_trail.c
935939
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
936940

941+
shapes/shapes_penrose_tile: shapes/shapes_penrose_tile.c
942+
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
943+
937944
shapes/shapes_pie_chart: shapes/shapes_pie_chart.c
938945
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
939946

@@ -992,6 +999,9 @@ textures/textures_bunnymark: textures/textures_bunnymark.c
992999
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
9931000
--preload-file textures/resources/raybunny.png@resources/raybunny.png
9941001

1002+
textures/textures_cellular_automata: textures/textures_cellular_automata.c
1003+
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
1004+
9951005
textures/textures_fog_of_war: textures/textures_fog_of_war.c
9961006
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
9971007

@@ -1143,6 +1153,9 @@ text/text_sprite_fonts: text/text_sprite_fonts.c
11431153
--preload-file text/resources/sprite_fonts/alpha_beta.png@resources/sprite_fonts/alpha_beta.png \
11441154
--preload-file text/resources/sprite_fonts/jupiter_crash.png@resources/sprite_fonts/jupiter_crash.png
11451155

1156+
text/text_strings_management: text/text_strings_management.c
1157+
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
1158+
11461159
text/text_unicode_emojis: text/text_unicode_emojis.c
11471160
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
11481161
--preload-file text/resources/dejavu.fnt@resources/dejavu.fnt \
@@ -1351,6 +1364,12 @@ shaders/shaders_fog_rendering: shaders/shaders_fog_rendering.c
13511364
--preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs \
13521365
--preload-file shaders/resources/shaders/glsl100/fog.fs@resources/shaders/glsl100/fog.fs
13531366

1367+
shaders/shaders_game_of_life: shaders/shaders_game_of_life.c
1368+
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
1369+
--preload-file shaders/resources/shaders/glsl100/game_of_life.fs@resources/shaders/glsl100/game_of_life.fs \
1370+
--preload-file shaders/resources/game_of_life/r_pentomino.png@resources/game_of_life/r_pentomino.png \
1371+
--preload-file shaders/resources/game_of_life/.png@resources/game_of_life/.png
1372+
13541373
shaders/shaders_hot_reloading: shaders/shaders_hot_reloading.c
13551374
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
13561375
--preload-file shaders/resources/shaders/glsl100/reload.fs@resources/shaders/glsl100/reload.fs

examples/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You may find it easier to use than other toolchains, especially when it comes to
1717
- `zig build [module]` to compile all examples for a module (e.g. `zig build core`)
1818
- `zig build [example]` to compile _and run_ a particular example (e.g. `zig build core_basic_window`)
1919

20-
## EXAMPLES COLLECTION [TOTAL: 201]
20+
## EXAMPLES COLLECTION [TOTAL: 205]
2121

2222
### category: core [47]
2323

@@ -73,7 +73,7 @@ Examples using raylib [core](../src/rcore.c) module platform functionality: wind
7373
| [core_text_file_loading](core/core_text_file_loading.c) | <img src="core/core_text_file_loading.png" alt="core_text_file_loading" width="80"> | ⭐☆☆☆ | 5.5 | 5.6 | [Aanjishnu Bhattacharyya](https://github.com/NimComPoo-04) |
7474
| [core_compute_hash](core/core_compute_hash.c) | <img src="core/core_compute_hash.png" alt="core_compute_hash" width="80"> | ⭐⭐☆☆ | 5.6-dev | 5.6-dev | [Ramon Santamaria](https://github.com/raysan5) |
7575

76-
### category: shapes [37]
76+
### category: shapes [38]
7777

7878
Examples using raylib shapes drawing functionality, provided by raylib [shapes](../src/rshapes.c) module.
7979

@@ -116,8 +116,9 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
116116
| [shapes_rlgl_color_wheel](shapes/shapes_rlgl_color_wheel.c) | <img src="shapes/shapes_rlgl_color_wheel.png" alt="shapes_rlgl_color_wheel" width="80"> | ⭐⭐⭐☆ | 5.6-dev | 5.6-dev | [Robin](https://github.com/RobinsAviary) |
117117
| [shapes_rlgl_triangle](shapes/shapes_rlgl_triangle.c) | <img src="shapes/shapes_rlgl_triangle.png" alt="shapes_rlgl_triangle" width="80"> | ⭐⭐☆☆ | 5.6-dev | 5.6-dev | [Robin](https://github.com/RobinsAviary) |
118118
| [shapes_ball_physics](shapes/shapes_ball_physics.c) | <img src="shapes/shapes_ball_physics.png" alt="shapes_ball_physics" width="80"> | ⭐⭐☆☆ | 5.6-dev | 5.6-dev | [David Buzatto](https://github.com/davidbuzatto) |
119+
| [shapes_penrose_tile](shapes/shapes_penrose_tile.c) | <img src="shapes/shapes_penrose_tile.png" alt="shapes_penrose_tile" width="80"> | ⭐⭐⭐⭐️ | 5.5 | 5.6-dev | [David Buzatto](https://github.com/davidbuzatto) |
119120

120-
### category: textures [28]
121+
### category: textures [29]
121122

122123
Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib [textures](../src/rtextures.c) module.
123124

@@ -151,8 +152,9 @@ Examples using raylib textures functionality, including image/textures loading/g
151152
| [textures_screen_buffer](textures/textures_screen_buffer.c) | <img src="textures/textures_screen_buffer.png" alt="textures_screen_buffer" width="80"> | ⭐⭐☆☆ | 5.5 | 5.5 | [Agnis Aldiņš](https://github.com/nezvers) |
152153
| [textures_textured_curve](textures/textures_textured_curve.c) | <img src="textures/textures_textured_curve.png" alt="textures_textured_curve" width="80"> | ⭐⭐⭐☆ | 4.5 | 4.5 | [Jeffery Myers](https://github.com/JeffM2501) |
153154
| [textures_sprite_stacking](textures/textures_sprite_stacking.c) | <img src="textures/textures_sprite_stacking.png" alt="textures_sprite_stacking" width="80"> | ⭐⭐☆☆ | 5.6-dev | 6.0 | [Robin](https://github.com/RobinsAviary) |
155+
| [textures_cellular_automata](textures/textures_cellular_automata.c) | <img src="textures/textures_cellular_automata.png" alt="textures_cellular_automata" width="80"> | ⭐⭐☆☆ | 5.6 | 5.6 | [Jordi Santonja](https://github.com/JordSant) |
154156

155-
### category: text [15]
157+
### category: text [16]
156158

157159
Examples using raylib text functionality, including sprite fonts loading/generation and text drawing, provided by raylib [text](../src/rtext.c) module.
158160

@@ -173,6 +175,7 @@ Examples using raylib text functionality, including sprite fonts loading/generat
173175
| [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐⭐⭐☆ | 4.2 | 4.2 | [Ramon Santamaria](https://github.com/raysan5) |
174176
| [text_inline_styling](text/text_inline_styling.c) | <img src="text/text_inline_styling.png" alt="text_inline_styling" width="80"> | ⭐⭐⭐☆ | 5.6-dev | 5.6-dev | [Wagner Barongello](https://github.com/SultansOfCode) |
175177
| [text_words_alignment](text/text_words_alignment.c) | <img src="text/text_words_alignment.png" alt="text_words_alignment" width="80"> | ⭐☆☆☆ | 5.6-dev | 5.6-dev | [JP Mortiboys](https://github.com/themushroompirates) |
178+
| [text_strings_management](text/text_strings_management.c) | <img src="text/text_strings_management.png" alt="text_strings_management" width="80"> | ⭐⭐⭐☆ | 5.6-dev | 5.6-dev | [David Buzatto](https://github.com/davidbuzatto) |
176179

177180
### category: models [27]
178181

@@ -208,7 +211,7 @@ Examples using raylib models functionality, including models loading/generation
208211
| [models_decals](models/models_decals.c) | <img src="models/models_decals.png" alt="models_decals" width="80"> | ⭐⭐⭐⭐️ | 5.6-dev | 5.6-dev | [JP Mortiboys](https://github.com/themushroompirates) |
209212
| [models_directional_billboard](models/models_directional_billboard.c) | <img src="models/models_directional_billboard.png" alt="models_directional_billboard" width="80"> | ⭐⭐☆☆ | 5.6-dev | 5.6 | [Robin](https://github.com/RobinsAviary) |
210213

211-
### category: shaders [32]
214+
### category: shaders [33]
212215

213216
Examples using raylib shaders functionality, including shaders loading, parameters configuration and drawing using them (model shaders and postprocessing shaders). This functionality is directly provided by raylib [rlgl](../src/rlgl.c) module.
214217

@@ -246,6 +249,7 @@ Examples using raylib shaders functionality, including shaders loading, paramete
246249
| [shaders_lightmap_rendering](shaders/shaders_lightmap_rendering.c) | <img src="shaders/shaders_lightmap_rendering.png" alt="shaders_lightmap_rendering" width="80"> | ⭐⭐⭐☆ | 4.5 | 4.5 | [Jussi Viitala](https://github.com/nullstare) |
247250
| [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) |
248251
| [shaders_depth_rendering](shaders/shaders_depth_rendering.c) | <img src="shaders/shaders_depth_rendering.png" alt="shaders_depth_rendering" width="80"> | ⭐⭐⭐☆ | 5.6-dev | 5.6-dev | [Luís Almeida](https://github.com/luis605) |
252+
| [shaders_game_of_life](shaders/shaders_game_of_life.c) | <img src="shaders/shaders_game_of_life.png" alt="shaders_game_of_life" width="80"> | ⭐⭐⭐☆ | 5.6 | 5.6 | [Jordi Santonja](https://github.com/JordSant) |
249253

250254
### category: audio [9]
251255

examples/examples_list.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,7 @@ others;easings_testbed;★★★☆;2.5;3.0;2019;2025;"Juan Miguel López";@flas
208208
others;raylib_opengl_interop;★★★★;3.8;4.0;2021;2025;"Stephan Soller";@arkanis
209209
others;embedded_files_loading;★★☆☆;3.0;3.5;2020;2025;"Kristian Holmgren";@defutura
210210
others;web_basic_window;★☆☆☆;5.6-dev;5.6-dev;2014;2025;"Ramon Santamaria";@raysan5
211+
shaders;shaders_game_of_life;★★★☆;5.6;5.6;2025;2025;"Jordi Santonja";@JordSant
212+
shapes;shapes_penrose_tile;★★★★;5.5;5.6-dev;2025;2025;"David Buzatto";@davidbuzatto
213+
text;text_strings_management;★★★☆;5.6-dev;5.6-dev;2025;2025;"David Buzatto";@davidbuzatto
214+
textures;textures_cellular_automata;★★☆☆;5.6;5.6;2025;2025;"Jordi Santonja";@JordSant

examples/shaders/shaders_game_of_life.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************************
22
*
3-
* raylib [shaders] example - Conway's Game of Life with shaders
3+
* raylib [shaders] example - game of life
44
*
55
* Example complexity rating: [★★★☆] 3/4
66
*
@@ -97,7 +97,7 @@ int main(void)
9797
bool buttonFaster = false;
9898
bool buttonSlower = false;
9999

100-
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - conway's game of life");
100+
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - game of life");
101101

102102
// Load shader
103103
Shader shdrGameOfLife = LoadShader(0, TextFormat("resources/shaders/glsl%i/game_of_life.fs", GLSL_VERSION));

examples/shapes/shapes_penrose_tile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Example complexity rating: [★★★★] 4/4
66
*
7-
* Example originally created with raylib 5.5
7+
* Example originally created with raylib 5.5, last time updated with raylib 5.6-dev
88
* Based on: https://processing.org/examples/penrosetile.html
99
*
1010
* Example contributed by David Buzatto (@davidbuzatto) and reviewed by Ramon Santamaria (@raysan5)

examples/text/text_strings_management.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int main(void)
6060
const int screenWidth = 800;
6161
const int screenHeight = 450;
6262

63-
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - strings management");
63+
InitWindow(screenWidth, screenHeight, "raylib [text] example - strings management");
6464

6565
TextParticle textParticles[MAX_TEXT_PARTICLES] = { 0 };
6666
int particleCount = 0;

examples/textures/textures_cellular_automata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************************
22
*
3-
* raylib [textures] example - one-dimensional elementary cellular automata
3+
* raylib [textures] example - cellular automata
44
*
55
* Example complexity rating: [★★☆☆] 2/4
66
*
@@ -64,7 +64,7 @@ int main(void)
6464
{
6565
// Initialization
6666
//--------------------------------------------------------------------------------------
67-
InitWindow(screenWidth, screenHeight, "raylib [textures] example - elementary cellular automata");
67+
InitWindow(screenWidth, screenHeight, "raylib [textures] example - cellular automata");
6868

6969
// Image that contains the cellular automaton
7070
Image image = GenImageColor(imageWidth, imageHeight, RAYWHITE);

projects/VS2022/examples/shapes_ball_physics.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</ProjectConfiguration>
5252
</ItemGroup>
5353
<PropertyGroup Label="Globals">
54-
<ProjectGuid>{6B1A933E-71B8-4C1F-9E79-02D98830E671}</ProjectGuid>
54+
<ProjectGuid>{0653AFAF-5578-4C02-AF29-0C873E7634AE}</ProjectGuid>
5555
<Keyword>Win32Proj</Keyword>
5656
<RootNamespace>shapes_ball_physics</RootNamespace>
5757
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>

0 commit comments

Comments
 (0)