Commit Graph

1384 Commits

Author SHA1 Message Date
Jeffery Myers e96bab7ce6
[Build] Fix warnings when building in VS 2022 (#4095)
* Update raylib_api.* by CI

* Fix warnings when building examples in MSVC 2022

* fix auto-format that sneaked in there.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-24 17:47:32 +02:00
Ray dcf2f6a8e9 Added note about performace #4067 2024-06-16 11:17:34 +02:00
Lázaro Albuquerque cc40a91343
[build] Fix some warnings on web builds and remove some redundant flags. (#4069)
* update

* Revert "update"

This reverts commit e8adcabd94.

* update

* remove a not stricly required flag
2024-06-16 10:42:50 +02:00
Ray 715633e0de REVIEWED: Spline cubic bezier example 2024-06-16 10:41:47 +02:00
Santiago Pelufo 640eaca8bf
[rshapes] Fix multisegment Bezier splines. (#3744)
* [rshapes] Fix multisegment Bezier splines.

It seems to me that these functions are wrong, if you step the index by 1 you move to a control point instead of the next segment.

* Fix example shapes/shapes_splines_drawing for bezier splines.

* Draw circles to fill gaps between bezier segments.
2024-06-16 10:21:54 +02:00
Mike Will 81ff879b04
zig: run examples from their directories (#4063)
So that they can find their respective resource folders.
2024-06-16 09:38:54 +02:00
Karl Zylinski fffae1a975
Fix fragPosition using wrong matrix in lighting_instancing.vs (#4056)
fragPosition was multiplied by mvp*instanceTransform, but it should only be multiplied by instanceTransform. Compare to lighting.vs, there we only use mvp for gl_Position, but matModel for the fragPosition.
2024-06-11 20:55:13 +02:00
Konrad Gutvik Grande 3948656d84
The example always showed a xbox controller, never a ps3 controller (#4040) 2024-06-07 10:21:02 +02:00
Sprix e74d13e6db
Fix examples not building with gestures system disabled (#4020)
Build no longer fails with -DSUPPORT_GESTURES_SYSTEM=OFF and -DBUILD_EXAMPLES=ON
2024-06-06 11:47:07 +02:00
vaezim d7a8af144d
Fix typos in markdowns and comments, Fix invalid links in HISTORY.md (#4017) 2024-05-30 08:22:07 +02:00
Ray 02d98a3e44 REVIEWED: 2d camera zoom, add alternative method #3977 2024-05-15 16:33:06 +02:00
Ray 479bd84400 Update shaders_palette_switch.c 2024-05-15 16:19:53 +02:00
Mike Will 46f9806359
Use logarithmic scaling for a 2d example with zoom functionality (#3977) 2024-05-15 16:19:22 +02:00
Ray 08ae888722 Update Makefile 2024-05-07 20:40:41 +02:00
Colleague Riley 9805fe0b1a
make RGFW a custom platform (#3941)
* fix minor bugs and errors (x86) for the RGFW platform, update RGFW platform license, update makefile info for RGFW platform

* revert

* (RGFW) (winapi) fix mouse hide bug when cursor changes

* ensure PLATFORM_SHELL is defined (PLATFORM_RGFW)

---------

Co-authored-by: ColleagueRiley <ColleagueRiley@gmail.com>
2024-05-07 20:30:52 +02:00
Ray 34d00d5217 Minor formatting tweaks 2024-05-05 19:46:31 +02:00
Ray b03c8ba945 WARNING: BREAKING: REDESIGN: `SetTextLineSpacing()`
Redesigned function to only consider separation between the end of vertical size of one line and the beginning of next line
2024-04-28 23:07:21 +02:00
KotzaBoss 4b0e25d3af
Add rlCullDistance variables/getters and rlSetClipPlanes function (#3912)
The `RL_CULL_DISTANCE_` definition remains as the initial value
of the variables.

Basic usage can be:
```c
#include <raylib.h>
#include <rlgl.h>

rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, MY_CULL_DISTANCE_FAR);

if (must_reset_clip_planes)
    rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
```
2024-04-23 14:24:37 +02:00
bohonghuang d80febde7d
[rlgl] Implement vertex normals for RLGL immediate drawing mode (#3866)
* Fix several non-functional `target_compile_definitions`

* Avoid hardcoding the default vertex attribute locations

* Implement functional `rlNormal3f`

* Add normal definitions for `DrawCube`

* Update the basic lighting example to use `DrawCube` and `DrawPlane`
2024-04-23 14:22:29 +02:00
freakmangd e0f6faa151
[build.zig] Drop support for 0.11.0 and use more idiomatic build script code (#3927)
* Remove support for 0.11.0, and make build script more idiomatic
+ remove all 0.11.0 compatibility functions
+ remove most LazyPath .path variants
  + I didn't touch emscripten, I don't know if its relative or absolute
+ change all absolute paths to use .cwd_relative
+ only use the builder allocator
+ have local dependencies use the package manager
+ make adding raygui more flexible
+ use zig-cache for generated wayland files

* Remove support for 0.11.0 in examples/build.zig

* update examples further and add clarifying comment on addRaygui
2024-04-22 09:13:01 +02:00
Ray 3caa424ad4 Review formatting 2024-04-21 12:29:09 +02:00
Ray 77cabc8bf2 Update shapes_draw_rectangle_rounded.c 2024-04-20 20:32:37 +02:00
Ray 68201c10c2 Update models_cubicmap.c 2024-04-20 19:58:14 +02:00
Benji b00e467494
Revert "Build specific example using -DBUILD_EXAMPLE cmake flag (#3921)" (#3922)
This reverts commit c1fd98591d.
2024-04-19 08:43:24 +02:00
Benji c1fd98591d
Build specific example using -DBUILD_EXAMPLE cmake flag (#3921) 2024-04-17 19:26:18 +02:00
Ray 112ce672e1 FIX: #3918 2024-04-17 19:12:47 +02:00
Ray a6a08c75eb Update corrupted-header sounds #3554 2024-04-17 18:30:02 +02:00
Yousif a4819f99cb
Update shaders_hybrid_render.c (#3908)
Fix typo
2024-04-10 10:36:03 +02:00
iP 1fad8277a3
optimisation of the "bone socket" tutorial (#3864)
Less matrix operations doing.
2024-03-10 21:49:04 +01:00
Rob Loach ba066656f7
[cmake] Disable SDL rlgl_standalone example (#3861)
* cmake: For SDL, disable rlgl_standalone

* cmake: Only build rlgl_standalone when on Desktop, and not shared libs
2024-03-08 12:33:40 +01:00
aiafrasinei 3b7be85151
Screen space related functions consistency (#3830)
* Screen/world-space related functions rename

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-07 12:28:11 +01:00
Rob Loach fccdfa7926
cmake: For SDL build, link the glfw dependency (#3860) 2024-03-07 12:11:46 +01:00
johann nadalutti 53221eb799
feat: vox_loader normals and new voxels shader (#3843) 2024-02-29 18:28:51 +01:00
Dalton Overmyer 077ab6d56b
Add an example that generates a random sequence. (#3846) 2024-02-29 18:26:49 +01:00
aiafrasinei 2aed94cfc2
Fix examples warnings for macos (#3842) 2024-02-27 22:15:09 +01:00
Ray 7fae41b5c6 Update models_bone_socket.c 2024-02-26 11:03:12 +01:00
Ray 3086bf1668 Update models_bone_socket.c 2024-02-26 10:49:01 +01:00
iP 2a263a09cc
bone socket tutorial (#3833)
Tutorial on how to use bones as sockets to calculate the position of something.
2024-02-26 10:30:22 +01:00
Peter0x44 1df91e74b9
Fix building of raylib_opengl_interop on PLATFORM_DESKTOP_SDL (#3826)
I tested this with CMake. I don't know if the examples makefile
currently handles this case.
2024-02-26 10:29:21 +01:00
Peter0x44 b86f78f6b1
Fix examples linking with CMake and -DPLATFORM=SDL (#3825)
Currently, every example fails linking likeso:

[  3%] Linking C executable audio_mixed_processor
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): undefined reference to symbol 'exp@@GLIBC_2.29'
/usr/bin/ld: /usr/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Apparently, linking libm explicitly is the solution.
2024-02-26 10:25:47 +01:00
Abhishek Rathore bda919033d
Fixed typo in a comment (#3816) (#3817)
Fixed a grammatical error by removing "are" to change `... but some are have multiple purposes ...` to `... but some have multiple purposes ...` in `textures/textures_image_generation`
2024-02-23 19:17:33 +01:00
Ray 23616153d4 Update Makefile 2024-02-22 23:25:05 +01:00
Peter0x44 31c6a340ab
Remove all uses of deps/mingw (#3805)
The purpose of this directory in GLFW is to provide some headers that
"mingw.org" doesn't. Raylib has long been unable to build with mingw.org
due to using certain symbols that aren't exposed in their headers.
(_ftelli64 and _access, among others.). Mingw-w64 already has the
necessary headers included, and doesn't need any of these external
implementations. For some reason, this also causes the following error
when building with Visual Studio's clang:

clang  -c rglfw.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
In file included from rglfw.c:61:
In file included from ./external/glfw/src/init.c:30:
In file included from ./external/glfw/src/internal.h:331:
In file included from ./external/glfw/src/platform.h:31:
In file included from ./external/glfw/src/win32_platform.h:70:
external/glfw/deps/mingw\xinput.h:227:26: error: a parameter list without types is only allowed in a function definition
  227 | void WINAPI XInputEnable(WINBOOL);
      |

If the last -Iexternal/glfw/deps/mingw is removed, the build works fine.

So, this workaround causes other problems, while not actually helping
raylib.

0bb605cd79/src/CMakeLists.txt (L272-L279)

GLFW's CMakeLists.txt first checks if either dinput.h or xinput.h are
provided by the toolchain, before telling the compiler to search for
headers in that directory. For EVERY compiler that can build raylib,
this is true.

In summary: This directory causes issues when building with some
compilers, and every toolchain that needs this workaround can't build
raylib anyway.
2024-02-22 23:06:22 +01:00
Ray e52ae870f2 Reverted Makefile `GL_ENABLE_GET_PROC_ADDRESS` #3713 2024-02-05 21:38:13 +01:00
Ray ea31bd47e5 REVIEWED: PLATFORM_WEB build flags, added GL_ENABLE_GET_PROC_ADDRESS
Reviewed flags formating
2024-02-05 21:12:57 +01:00
Ray 615ee9d177 REVIEWED: `rlLoadFramebuffer()` 2024-02-04 12:13:56 +01:00
Ray 40f3df5b86 Update core_2d_camera_platformer.c 2024-01-24 21:17:11 +01:00
freakmangd 482722d881
Update to latest zig 0.12.0dev while keeping 0.11.0 compatibility (#3715)
* update build.zig for latest zig 0.12.0dev while still allowing 0.11.0

* update examples/build.zig and add nicer message for type mismatch
2024-01-11 19:48:37 +01:00
Hongyu Ouyang 721e273547
Fix a bug in examples/shapes/shapes_following_eyes (#3710) 2024-01-06 11:32:10 +01:00
Ray 3afb4dda97 Update raygui.h 2024-01-05 22:32:59 +01:00