Raylib allows for providing custom allocators via macros.
GLFW supports this too, but via function pointers.
Make sure that GLFW uses those Raylib macros, by wrapping them in
function calls and setting them up inside of InitPlatform().
This is possible because of glfwInitAllocator() and GLFWallocator.
Fixes: https://github.com/raysan5/raylib/issues/4776
Relates-to: https://github.com/raysan5/raylib/issues/4751
I was really wondering what is going on here :D I believe this code
tried initially to out-cast 'const' specifier but this is not needed here
at all. Currently, it just confuses whoever reads this so I changed it.
The old code would also trigger -Wcast-qual warning on some compilers.
Currently, a warning about _GNU_SOURCE being redefined is emitted when
compiling rglfw.c
In file included from rglfw.c:99:
external/glfw/src/posix_poll.c:27:9: warning: "_GNU_SOURCE" redefined
27 | #define _GNU_SOURCE
| ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition
This can be avoided by not defining _GNU_SOURCE on the command line for
this file.
Defining feature test macros in source code is not really good practice
so this should probably reviewed in glfw itself, at least to maybe check
#ifdef _GNU_SOURCE first. But for now this change will suffice.
Fixes#4725
When asking Makefile to create SHARED library for WEB
$ make TARGET_PLATFORM=PLATFORM_WEB RAYLIB_LIBTYPE=SHARED
it would instead silently create STATIC library
thus not fulfilling the request as expected
This commit adds an error in this case and stops further execution.
This is not consistent with Cmake, because Cmake throws the warning and
does not stop, but Cmake can easily recover from this case and people
probably does not even notice it. However, Makefile is something that
you have to handle yourself and you have to recover from any issues so
having an error and aborting with exit code 1 is more expected.
Otherwise people may spend a lot of time debugging Makefile in order to
understand what's even going on.
Fixes: https://github.com/raysan5/raylib/issues/4717
define STBIR_NO_SIMD when __TINYC__ is defined so stb_image_resize2 will
not include *mmintrin which are not supported by all compilers.
There are similar checks for __TINYC__ already elswere in raylib
and they are also mostly there to disable SIMD headers.
Additionally, move similar check for stb_image, to be a little bit
deeper. Before it was defining STBI_NO_SIMD without including stb_image
It was also clashing with note, causing said note to make no sense.
Fixes: https://github.com/raysan5/raylib/discussions/2994
Reference: https://github.com/nothings/stb/issues/1738
* Update examples inconsistencies
* Happy new years, examples!
* Missed one inconsistency
* Update final few examples inconsistencies
---------
Co-authored-by: Anstro Pleuton <anstropleuton@github.com>