Commit Graph

1812 Commits

Author SHA1 Message Date
Ray
bb910bb0b8 REXM: RENAME: example: models_geometry_textures_cube --> models_rotating_cube 2025-10-17 12:33:41 +02:00
Jopestpe
4256be5608 Fix branch array size and remove extra function (#5281)
* Fix branch array size and remove extra function

* Fix branch array size and remove extra function
2025-10-17 08:53:48 +02:00
Jopestpe
087aa1bc3f Fix triangle strip array size and simplify loop (#5280) 2025-10-17 08:53:02 +02:00
GideonSerf
c6f9f76afb [examples] Added donut pie charts to shapes_pie_chart (#5277)
* Added donut chart option to pie chart example

* Increased example description buffer size

* Testing mouse trail building

* Removed unused variable

---------

Co-authored-by: Gideon Serfontein <gse@newspacesystems.com>
2025-10-16 09:53:55 +02:00
Ray
8e052b81b4 REVIEWED: New examples on VS project 2025-10-15 19:59:28 +02:00
Ray
4ba92f8962 REVIEWED: Solution when adding new examples 2025-10-15 19:48:36 +02:00
JordSant
2a04317cff [examples] Added: shapes_particles (#5260)
* [Examples] Added shapes_particles

* Changes to follow the code conventions. Improved some things.

* Fixed name

* Fixed PNG name

---------

Co-authored-by: Ray <raysan5@gmail.com>
2025-10-15 19:39:47 +02:00
themushroompirates
1c45776bb7 Added clock of clocks example (#5263) 2025-10-15 19:37:17 +02:00
themushroompirates
1c39d47b5b Added simple starfield example (#5255) 2025-10-15 19:34:39 +02:00
themushroompirates
047c9d2052 Added text alignment example (#5254)
Co-authored-by: Ray <raysan5@gmail.com>
2025-10-15 19:33:53 +02:00
Balamurugan R
7383de3dea feat(shapes): Add shapes_mouse_trail.c example and screenshot (#5246)
Co-authored-by: Balamurugan R <balamuruga.r050814@gmail.com>
2025-10-15 19:30:37 +02:00
Robin ❤️
21404d958e [examples] Added core_clipboard_text (#5231)
* added clipboard example

* added image check

* added note about windows

* added indent
2025-10-15 19:28:38 +02:00
Hugo
d2acf06779 [examples] Added core_directory_files (#5230)
* ADDED: example: `core_directory_files`

* Follow raylib's conventions

* Rework `core_directory_files` example

* Removed alternating colors & text on directory

* Update screenshot

---------

Co-authored-by: Ray <raysan5@gmail.com>
2025-10-15 19:27:42 +02:00
GideonSerf
af11859906 [examples] Added shapes_pie_chart (#5227)
* Added shapes_pie_chart example

* Made the example colorful

* Added some interactivity to the example

* Revert top comment to the standard

* Remove unused MAX_SLICES constant

---------

Co-authored-by: Gideon Serfontein <gse@newspacesystems.com>
Co-authored-by: Ray <raysan5@gmail.com>
2025-10-15 19:25:01 +02:00
Jeffery Myers
7191749d66 [examples] Fix examples to work in MSVC (#5267)
* Fix warnings in many examples
Add examples to MSVC solution correctly

* fix CI error

---------

Co-authored-by: Ray <raysan5@gmail.com>
2025-10-15 19:02:52 +02:00
Ray
9f831428e6 Update core_render_texture.c 2025-10-09 17:16:54 +02:00
Ray
c80726511c Merge branch 'master' of https://github.com/raysan5/raylib 2025-10-09 01:09:58 +02:00
Ray
767df4cf52 Update core_render_texture.c 2025-10-09 01:09:55 +02:00
Ray
04a1a0293e Update examples_list.txt 2025-10-08 18:17:32 +02:00
Ray
f62565dc72 Update text_unicode_ranges.c 2025-10-08 18:16:46 +02:00
Hugo
9bf7699624 [examples] Added shapes_kaleidoscope (#5233)
* ADDED: example: `shapes_kaleidoscope`

* Add line reflection

* Updated with `rexm update`

* Follow raylib's conventions
2025-10-08 00:10:43 +02:00
Jopestpe
4cfae99a74 [examples] Added shapes_triangle_strip (#5240)
* [examples] Add shapes_triangle_strip

* Remove functions
2025-10-07 20:25:22 +02:00
Jopestpe
b99a6cc6bd [examples] Added shapes_recursive_tree (#5229)
* ADDED: example: shapes_recursive_tree

* [examples] Added shapes_recursive_tree

* [examples] shapes_recursive_tree: adjustments

* Reduced tree depth from 12 to 10

* new shapes_recursive_tree.png

* follow the conventions

* follow the conventions 2
2025-10-06 22:35:18 +02:00
Ray
718a841cfb REXM: Update examples 2025-10-02 13:54:11 +02:00
Ray
78a79a8523 Update list 2025-10-02 13:40:36 +02:00
Ray
7e3b7cd349 REVIEWED: DrawLineDashed() 2025-10-02 13:38:13 +02:00
Ray
377853bb32 REXM: Updated new examples requried files 2025-10-02 13:16:00 +02:00
Ray
5d9c11e165 Updated examples 2025-10-02 13:04:34 +02:00
Ray
de20076d36 Update examples_list.txt 2025-10-02 13:02:58 +02:00
Robin ❤️
a5a5d3f347 removed unneeded include (#5225) 2025-10-01 18:33:51 +02:00
Jopestpe
1cdf1dcbbe [examples] Add models_geometry_textures_cube (#5221)
* ADDED: example:  models_geometry_textures_cube

* FIXED: example: models_geometry_textures_cube - removed leftover TODO and aligned title with header
2025-10-01 18:31:53 +02:00
Maicon Santana
452cac33b8 [examples] Add core_monitor_change (#5215)
* Add core monitor change example

* Add monitor drawing and more information

* Update monitor information every frame

* Show info and window position inside the rectangle
2025-10-01 18:31:03 +02:00
Luís Almeida
f680776941 feat:Added DrawLineDashed() and a new example explaining how to use this new function. (#5222) 2025-10-01 11:43:38 +02:00
Robin ❤️
e5f809f534 switch to enum (#5223) 2025-10-01 11:42:35 +02:00
Robin ❤️
6ed61e107b flipped binary check to fix bug (#5220) 2025-09-30 21:49:58 +02:00
Ray
8932ba0b0a Update core_delta_time.c 2025-09-30 18:48:42 +02:00
Ray
6966ad5717 Update shaders_ascii_rendering.c 2025-09-30 18:39:27 +02:00
Robin ❤️
3f30533f1c [examples] Add core_delta_time (#5216)
* delta example

* clarification

* made it more clear what delta time is

* more explanation

* vector2 positions, removed all warnings

* removed keys, moved global to local, conventions & comments, show target fps

* new png

* remove more periods

* another period

* remove note about conventions, remove period
2025-09-30 18:35:15 +02:00
Maicon Santana
a553fbd0c7 [examples] Fix shaders_ascii_rendering (#5219)
* Add ascii post processing

* Fix broken characters and add more comments

* Rename example

* Refactored as requested
2025-09-30 18:34:06 +02:00
Jopestpe
0e2e8ce225 [examples] Update shapes_bouncing_ball with gravity (#5217)
* [examples] Add shapes_bouncing_ball with gravity

* gravity could be enabled/disabled
2025-09-30 18:32:25 +02:00
Ray
5d9352a0a1 Update shapes_bullet_hell.c 2025-09-30 18:27:59 +02:00
zero
56e32f2c3e ADDED: example: shapes_bullet_hell (#5218)
* add shapes_bullet_hell example

* adjust example count
2025-09-30 11:59:44 +02:00
Ray
218a806ec2 REVIEWED: example: shaders_ascii_rendering 2025-09-29 18:01:42 +02:00
Maicon Santana
317c1eaeeb Add ascii post processing (#5213) 2025-09-29 17:44:48 +02:00
Le Juez Victor
584bc14929 [rlgl] Add Software Rendering Support (#4832)
* add base of rlsw.h

* implement state support
Also replace the triangle rasterization functions with macros that generate specific functions for each state of the rendering system.
Also, add the OpenGL definitions in order to add a binding for rlgl.

* branchless float saturation

* apply perspective correction to colors

* impl line clipping and rasterization
+ tweak function names

* impl face culling

* impl color blending

* fixes and tweaks

* add clear buffer bitmasks

* small optimizations / tweaks

* review ndc to screen projection

* avoid to recalculate MVP when its not needed + tweaks

* review the loading and management of textures
to be closer to the OpenGL API

* texture sampling optimization

* review get pixel functions
+ review unorm/float conversion

* add several buffer format support
Several depth and color formats have been added for the framebuffer.

8-bit, 16-bit, and 24-bit formats are now available for depth.

RGB 8-bit (332), RGB 16-bit (565), and RGB 24-bit (888) formats are now available for color.

Alpha support is no longer present for the framebuffer at the moment, but it can easily be restored by adding the formats and reinterpolating the alpha in the areas that do not perform color blending.

Additionally, this commit brings performance improvements.

* tweaks

* impl line width

* impl points + point size

* fix and improve polygon clipping functions

* impl polygone modes

* add some not planned functions
- `glDepthMask`
- `glColorMask`

* framebuffer resizing + handle init failure

* add quick notes about line clipping algorithms used

* start to impl scissor test + review line clipping
The support for the scissor test has been implemented for clearing as well as for triangle clipping.
The implementation for lines and points is still missing.

I also removed the 2D clipping of lines that used the Cohen-Sutherland algorithm, opting instead to always use the Liang-Barsky algorithm in all cases.
This simplifies the implementation, and the 2D version would have caused issues when interpolating vertices in the future if we want to implement additional features.

* review scissor clear

* review `swScissor`

* impl line scissor clipping

* round screen coordinate (line rasterization)

* impl point scissor clipping

* remove unused defs

* add getter functions

* gl binding

* add `glHint` and `glShadeModel` macros (not implmented)

* binding tweaks

* impl copy framebuffer function + glReadPixels

* review `swCopyFramebuffer`

* update rlgl.h

* update rlgl.h

* texture copy support

* fix typo..

* add get error function

* def sw alloc macros

* reimpl get color buffer func
just in case

* remove normal interpolation

* review texture wrap

* fix ndc projection (viewport/scissor)

* impl framebuffer blit function

* reduce matrix compuations and memory usage

* swBegin tweaks

* preventing a possible division by zero

* remove useless scissor related data

* review color blending system

* greatly improve float saturation

* tweak lerp vertex function

* use opitmized fract function in sw_texture_map

* tweak framebuffer functions for better readability

* optimized copy/blit functions for each dst format

* review framebuffer filling functions

* impl specific quad rendering func

* use of a single global vertex buffer

* fix 'sw_poly_point_render'

* added `SW_RESTRICT` and redesigned `sw_lerp_vertex_PNCTH`

* tweak the pipeline flow regarding the face culling
avoids misprediction, improves vectorization if possible

* new rendering path for axis aligned quads

* oops, translating some comments

* use of `restrict` for blending function parameters

* update rlgl.h

* adding `GRAPHICS_API_OPENGL_11_SOFTWARE` in `DrawMesh`

* add `RL_OPENGL_11_SOFTWARE` enum

* temp tweak

* build fixes

* fix DrawMesh for GL 1.1

* update swClose

* review texture format + fix copy

* set minimum req vertices to 3 (quads)

* check swInit

* review pixelformat

* tweaks

* fix animNormals (DrawMesh)

* fallback color/texcoord (swDrawArrays)

* review swMultMatrixf

* fix texture pool alloc..

* review triangle scanlines
increment all data

* fix `sw_quad_sort_cw`

* impl sdl platform

* rm def

* increase max clipped polygon vertices

* improve triangle rasterization along Y axis
improved robustness against numerical errors
incremental interpolation along Y
simplified function, fewer jumps

* review current vertex data
+ increase max clipped polygon vertices (for extreme cases)

* fix and improve polygon clipping
Sets the vertex count to zero when the polygon is invalid
Stops clipping when the vertex count drops below 3

* fix gradient calculation

* cache texture size minus one + comments

* tweaks

* BGRA copy support

* adding software backend option (cmake)

* update Makefile

* fix face culling

* excluse some exemple with the software backend

* review SW_CLAMP case in sw_texture_map

* review sw_saturate

* review line raster

* fix sw_quad_is_aligned

* review sw_raster_quad_axis_aligned

* tweaks

* codepoint fix (?)

* fix var name...

* rcore_drm software renderering

* cleanup and tweaks

* adding support for `GL_POINT_SIZE` and `GL_LINE_WIDTH` get

* fix sampling issue

* fix swBlendFunc

---------

Co-authored-by: Ray <raysan5@gmail.com>
2025-09-29 10:28:20 +02:00
Tim Little
c551fb7118 Add models_basic_voxel example (#5212) 2025-09-28 23:40:09 +02:00
Ray
7d780d18b5 REVIEWED: New example format and requirements: core_input_actions #5211 2025-09-28 23:31:07 +02:00
Jett
a2a22e5e48 ADDED: example: core_input_actions (#5211)
* adding core_input_actions

action based input API vs direct input, allows remapping of buttons or keys to an action.

* adjusted formatting.

* updates for struct name

and fixed a typo
2025-09-28 23:02:53 +02:00
Smallz3201
fe8c83b57d Update palette_switch.fs (#5205)
Removed unnecessary `a` in palette_switch.fs `note` comment
2025-09-26 20:56:54 +02:00
Maicon Santana
07033cff90 Fix polygon drawing example for opengl 1.1 (#5202) 2025-09-24 20:44:15 +02:00