5203 Commits

Author SHA1 Message Date
Ray
153401810a Merge branch 'master' of https://github.com/raysan5/raylib 2025-10-17 10:04:29 +02:00
Ray
9ed785c2e1 Update rlgl.h 2025-10-17 10:04:21 +02:00
MULTi
311f6243e3
Disable touch position simulation from mouse movement for DRM touchscreen devices (#5279) 2025-10-17 10:01:24 +02:00
Ray
601ff4f02e REVIEW: Naming tweaks and comments added #5271 2025-10-17 09:54:49 +02:00
Mr. Ai
484cc0e255
Fix DrawBillboardPro so that flipped images that are sampling from part of a larger texture still draw from the same source rectangle (#5276)
Co-authored-by: Violently <violently@violently.violently>
2025-10-16 10:18:42 +02:00
Ray
af068ec020 Reviewed dynamic library building #5270 2025-10-15 20:18:44 +02:00
Ray
18e4d1d44f Reviewed formating 2025-10-15 19:20:11 +02:00
Saksham Goyal
adfe2c1704
C++ compiler support v2 (#5252)
* Get C++ compilers working

* Fix Formatting
2025-10-15 19:11:44 +02:00
JohnnyCena123
17bc628fd9
[rcore] Add ComputeSHA256() function (#5264)
* [rcore] Add `ComputeSHA256()` function

* adjust function signatures

* review issues

* fix repeating 0

* fix mistake

* fixed macro

* remove undefs

* review styling mismatches

* rename `A0,1` to `SHA256_A0,1`

---------

Co-authored-by: CrackedPixel <5776225+CrackedPixel@users.noreply.github.com>
2025-10-15 19:07:41 +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
Arrangemonk
e3a562ab57
UpdateModelAnimation does matrixtranspose(matrixinvert) only once per bone instead of per vertex (#5244) 2025-10-15 19:00:24 +02:00
Jeffery Myers
aaf4c1d3ae
always forward declare the windows stuff, prevents failure of rgfw in GCC. (#5269) 2025-10-15 00:18:48 +02:00
Thomas Anderson
2d7b66dd37
change free to RL_FREE (#5265) 2025-10-13 22:15:20 +02:00
JohnnyCena123
6f584464b6
remove duplicate entry from keyMappingRGFW (#5242) 2025-10-08 15:04:29 +02:00
Ray
5dd97ecf2f REVIEWED: TextToPascal(), fix https://github.com/raylibtech/rtools/issues/57 2025-10-07 19:42:05 +02:00
Maicon Santana
de50402dd5
Check if video mode is valid and rename to match with other methods (#5235) 2025-10-05 22:26:25 +02:00
pyrokn8
07aafdd585
Updated miniaudio.h - v0.11.23 (#5234)
Co-authored-by: pyrokn8 <202429796+pyrokn8@users.noreply.github.com>
2025-10-04 19:40:53 +02:00
JohnnyCena123
02b3e44f88
swap TraceLog to TRACELOG (#5226) 2025-10-02 14:13:07 +02:00
Ray
7e3b7cd349 REVIEWED: DrawLineDashed() 2025-10-02 13:38:13 +02:00
Ray
a0a0d4d5ad Update rcore_desktop_win32.c 2025-10-02 13:05:42 +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
Ray
37149082e8 Avoid warnings 2025-09-29 18:05:16 +02:00
Ray
0e57a572b4 REVIEWED: rlsw module and related files 2025-09-29 18:05:07 +02:00
Ray
beabb1300d Revert "Update miniaudio to v0.11.23 (#5208)"
This reverts commit 4cd131cf292bf4f5e06c7db89e9224fe36894330.
2025-09-29 18:03:42 +02:00
Antonio Jose Ramos Marquez
3da2fc1bf8
[rtextures] fix initialization align in Image to avoid issues with some platforms (#5214) 2025-09-29 17:16:51 +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
Ray
4767841b71 Code format review 2025-09-28 19:45:52 +02:00
iann
f36c8ddc56
[rlgl] Allow tint colors in GL_LINE (wires) and GL_POINT (points) draw modes on OpenGL 1.1 clean (#5207)
* gate with OPENGL_11 prototype and definition for rlSetPointSize and rlGetPointSize

* gate with OPENGL_11 prototype and definition for rlSetPointSize and rlGetPointSize

* more coverage for fixing expected texcoords, normals, and colors

* fix guard styling

* fix guard issue, and remove fallback unneccessary else clause (default shader ill work)

* opengl3.3 and es2 need the color array allocated in order to allow for updates later (unlike opengl11)
2025-09-28 19:34:38 +02:00
Alexandre Almeida
4cd131cf29
Update miniaudio to v0.11.23 (#5208) 2025-09-28 18:53:40 +02:00
Ray
070c7894c6 REVIEWED: Some flags for window/context creation attributes 2025-09-26 23:35:28 +02:00
Ray
e79603d501 REDESIGNED: rcore_desktop_win32 platform backend
Now it works! but there is still work to do to support all required features...

I really enjoyed reviewing and redesigning this platform backend!
2025-09-26 23:17:37 +02:00
Ray
06cfda6ff9 Update raymath.h 2025-09-26 23:03:10 +02:00
Ray
87f758f9b4 Review latest PRs formatting 2025-09-26 22:26:19 +02:00
Arman Ommid
15d234b79d
GLTF anim correctly inherits world transform (#5206) 2025-09-26 20:56:37 +02:00
Keks137
3f6d67c61c
[rcore_android] implement GetCurrentMonitor() (#5204) 2025-09-24 20:45:55 +02:00
Maicon Santana
2554dcba9b
fix rlSetTexture not overriding default mode (#5200) 2025-09-24 10:22:03 +02:00
JohnnyCena123
085391e788
[build][cmake] fix issue introduced by #5181 (#5198)
* fix web build issue with CMake introduced by #5181

* remove ASYNCIFY
2025-09-23 18:04:30 +02:00
Arman Ommid
fbae395e85
Update raymath.h (#5201) 2025-09-23 17:58:42 +02:00
Ray
23e0898c65 Ouch! 2025-09-18 15:51:18 +02:00
Ray
c264c86ee0 ADDED: Some useful functions for Files and Text management
// File management functions
 - int FileRename(const char *fileName, const char *fileRename); // Rename file (if exists)
 - iint FileRemove(const char *fileName);                         // Remove file (if exists)
 - iint FileCopy(const char *srcPath, const char *dstPath);       // Copy file from one path to another, dstPath created if it doesn't exist
 - iint FileMove(const char *srcPath, const char *dstPath);       // Move file from one directory to another, dstPath created if it doesn't exist
 - int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
 - iint FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file

// Text management functions
 - const char *TextRemoveSpaces(const char *text);                                       // Remove text spaces, concat words
 - char *GetTextBetween(const char *text, const char *begin, const char *end);           // Get text between two strings
 - char *TextReplace(const char *text, const char *search, const char *replacement);     // Replace text string (WARNING: memory must be freed!)
 - char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings (WARNING: memory must be freed!)
2025-09-18 15:34:09 +02:00
Ray
bd6065a4fd Update rlgl.h 2025-09-18 15:29:13 +02:00
Ray
dc1632c17a REVIEWED: Platform code formatting and organization 2025-09-18 15:28:03 +02:00
Jeffery Myers
7729727752
Use the render size not the screen size for screenshots so we use the actual framebuffer size. (#5192) 2025-09-18 00:01:24 +02:00
Max Coplan
fbdf5e4fd2
fix(rcore): correctly scale content on macOS (#5186)
Currently, scaling doesn't work correctly on macOS (see #5185).  This commit
works around this issue by disabling SCALE_FRAMEBUFFER on macOS when
`FLAG_WINDOW_HIGHDPI` is unset.
2025-09-16 19:37:05 +02:00
Ray
ed8f1a22d1 Remove trailing spaces 2025-09-14 18:07:58 +02:00
Bruno Cabral
b281101001
[build][cmake] Review web compilation system (#5181)
* [cmake] export automatically raylib definitions and compile/link options

* [cmake] pass emscripten options to consumer project

* [web] compile for web

* [web] canvas width 100%
2025-09-14 10:05:07 +02:00
Ray
b8420d4821 REXM: Update examples 2025-09-13 10:46:14 +02:00
Bruno Cabral
bb0c78476c
[build][cmake] Fix definition to use SDL3 (#5175)
* fix definition to use SDL3

* [cmake] fix definition to use SDL3

* [build][cmake] prefer USING_VERSION_SDL3 over PLATFORM_DESKTOP_SDL3

* [build][cmake] when libs are added externally, consumer needs to import them too
2025-09-13 10:19:44 +02:00
Bruno Cabral
6cf38b6292
fix SDL3 gamepad detection (#5176) 2025-09-13 10:17:17 +02:00
Bruno Cabral
71321d179b
[build][cmake] Added emscripten build options (#5180)
* [cmake] export automatically raylib definitions and compile/link options

* [cmake] pass emscripten options to consumer project
2025-09-12 21:42:50 +02:00