* Add zig buildfile for examples.
- `zig build` to compile all examples
- `zig build [module]` to compile all examples for a module (e.g. `zig build core`)
- `zig build [example]` to compile _and run_ a particular example (e.g. `zig build core_basic_window`)
You can use `-Dtarget=` to compile for a non-native platform, such as
`zig build -Dtarget=x86_64-windows-gnu` to compile from Linux to
Windows.
* Skip pthread example on Windows.
* Select appropriate lib file based on target.
raylib was using `stb_perlin.h` library to generate perlin noise, it seems that recently this library has been flagged as it could be infringing some algorythm patent. For security, it has been removed from raylib.
CONVENTIONS:
- Functions are always self-contained, no function use another raymath function inside, required code is directly re-implemented inside
- Functions input parameters are always received by value
- Functions use always a "result" variable for return
- Functions are always defined inline
- Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
* new models_magicavoxel_loading example
* Portable header-only file "magicavoxel_loader.h" for MagicaVoxel loader example.
* models_magicavoxel_loading example added to CMakeLists.txt and Makefile
* fix models_magicavoxel_loading example for linux.
* * vox_loader into "src/external/vox_loader.h"
* vox file support for "models.c"
* updated example "models/models_magicavoxel_loading.c"
* * Fix Vox_FreeArrays (removed memory leak)
* * removed magicavoxel_loader.h
* * Revert vs2019 solution
* * vox_loader.h -> Support custom memory allocators
* vox_loader.h -> Reverse Y<>Z for left to right handed system
* models/models_magicavoxel_loading.c -> fix model center
* * vox_loader.h -> Removed Raylib dependencies
* * Changed Vox_LoadFileName to Vox_LoadFromMemory
* new models_magicavoxel_loading example
* Portable header-only file "magicavoxel_loader.h" for MagicaVoxel loader example.
* models_magicavoxel_loading example added to CMakeLists.txt and Makefile
* fix models_magicavoxel_loading example for linux.
* * vox_loader into "src/external/vox_loader.h"
* vox file support for "models.c"
* updated example "models/models_magicavoxel_loading.c"
* * Fix Vox_FreeArrays (removed memory leak)
* * removed magicavoxel_loader.h
* * Revert vs2019 solution
- DrawTextRec() and DrawTextRecEx() have been moved to example, those functions could be very specific depending on user needs so it's better to give the user the full source in case of special requirements instead of allowing a function with +10 input parameters.
* Fix Makefile to build WASM examples.
- Add --preload-file flag before specifying the resource dir
- Add empty resource dir to `shapes/` (otherwise wasm-ld will fail)
- Add wasm outputs to .gitigore
* Delete .gitignore
Co-authored-by: Ray <raysan5@gmail.com>
Now rlgl uses the `Matrix` type, just make sure it has been previously defined somewhere... I don't like this approach but it's probably the easier one for the users... still looking for a better solution... maybe using something like
`#define MATRIX_TYPE`, so it can be checked in other modules.
rlgl has been redesigned to avoid any dependency to `raylib` or `raymath`, all functions using some of those libs have been reviewed.
- REMOVED: `Texture2D`, `Shader` structs dependency
- REMOVED: `Vector3`, `Matrix` structs dependency
- REMOVED: raymath functions dependency, all required math is implemented in rlgl
- ADDED: `rlMatrix` custom rlgl type
- ADDED: `utils.c`: `rlMatrixFromMatrix()` and `rlMatrixToMatrix()` for a safe conversion between raylib<->rlgl matrix types
- ADDED: `rl` prefix to all `rlgl` structs
- Other small tweaks here and there