Commit Graph

5331 Commits

Author SHA1 Message Date
atticus 6d20430ccc
add NULL check (#1925) 2021-08-20 11:47:51 +02:00
Ray a5beb940f8 Remove trailing spaces 2021-08-16 23:23:16 +02:00
Ray f3385b6ad2 Update rlgl.h 2021-08-16 19:52:57 +02:00
Ray ef8526ae36 Update rlgl.h 2021-08-16 19:26:10 +02:00
Ray 92a13878dc Add some comments 2021-08-16 19:23:06 +02:00
Ray 1b4c58b66f WARNING: BREAKING: Use `frameCount` on audio
This is a big change for optimization and a more professional understanding of audio. Instead of dealing with samples, now we deal with frames, like miniaudio does, so, avoiding continuous conversions from samples to frames.
2021-08-16 11:06:31 +02:00
Dennis E. Hamilton e203fb58c6
Match build-windows.bat changes (#1923)
The location for manual setting of the vcvarsall.bat location moved to line 38 in the latest change.
2021-08-16 09:53:14 +02:00
raysan5 462e7aec52 Updated `RAYLIB_VERSION` to `4.0-dev`
Several breaking changes have been done lately so I think it's better to mark raylib for next release as 4.0.
2021-08-15 13:25:14 +02:00
raysan5 aae60e1e44 REVIEWED: `extern "C"` definition position for consistency
Note that `extern "C"` calling convention only affects objects that need to be seen by the linker, in our case only functions... but it would also be required by global variables exposed, if any.
2021-08-15 13:02:53 +02:00
raysan5 848cdb267a Support C++ usage as standalone library 2021-08-15 12:58:34 +02:00
raysan5 760cfd361e REVIEWED: `PHYSACDEF` definition and C++ issues #1918 2021-08-15 12:52:12 +02:00
630Studios 092435d51c
[Models] Fix for issue #1809 (#1917)
* GenMeshTangents Fix

* GenMeshTangents Fix - Comment Update

* GenMeshTangents Fix - Comment Update final

* Code Style Changes

* Code Style Changes Final

* Code Style Changes Final 2

* GenMeshTangents better handling for issue #1876

* GenMeshTangents better handling for issue #1876

* GenMeshTangents: Better fix for issue #1876

* vboId location fix

* rlUpdateVertexBuffer - bufferId is an unsigned int

* Fix for issue#1809 - Obj with more materials then mesh caused crash

* Fix for issue#1809 - Formatting Update
2021-08-12 21:01:40 +02:00
raysan5 1dff5814be ADDED: rlUpdateVertexBufferElements() #1915 2021-08-12 21:01:09 +02:00
raysan5 26db391576 ADDED: `rlActiveDrawBuffers()` #1911
- ADDED: rlEnableColorBlend()/rlDisableColorBlend()
2021-08-12 20:38:57 +02:00
630Studios ce3214b82d
[rlgl] rlUpdateVertexBuffer (#1914)
* GenMeshTangents Fix

* GenMeshTangents Fix - Comment Update

* GenMeshTangents Fix - Comment Update final

* Code Style Changes

* Code Style Changes Final

* Code Style Changes Final 2

* GenMeshTangents better handling for issue #1876

* GenMeshTangents better handling for issue #1876

* GenMeshTangents: Better fix for issue #1876

* vboId location fix

* rlUpdateVertexBuffer - bufferId is an unsigned int
2021-08-12 09:47:00 +02:00
raysan5 621a8766a8 WARNING: BREAKING: Renamed `CharInfo` to `GlyphInfo` and more...
This commit introduces some breaking changes for library consistency, hopefully not too dramatic... Here the full list:
 - RENAMED: struct `CharInfo` to `GlyphInfo`, actually that's the correct naming for the data contained. It contains the character glyph metrics and the glyph image; in the past it also contained rectangle within the font atlas but that data has been moved to `Font` struct directly, so, `GlyphInfo` is a more correct name.
 - RENAMED: `CodepointToUtf8()` to `CodepointToUTF8()`, capitalization of UTF-8 is the correct form, it would also require de hyphen but it can be omitted in this case.
 - RENAMED: `TextToUtf8()` to `TextCodepointsToUTF8` for consistency and more detail on the functionality.
 - ADDED: `GetGlyphInfo()` to get glyph info for a specific codepoint
 - ADDED: `GetGlyphAtlasRec()` to get glyph rectangle within the generated font atlas
 - Some additional tweaks for consistency
2021-08-11 21:16:39 +02:00
raysan5 b6541b7a55 REVIEWED: DrawTextPro()
WARNING: DrawTextPro() requires including `rlgl.h`, before it was only dependant on `textures` module.
2021-08-11 19:02:15 +02:00
raysan5 7e27c2ffa8 TODO: DrawTextPro() rotation not working? 2021-08-11 18:53:06 +02:00
raysan5 b55418effd ADDED: DrawTextPro() with text rotation support 2021-08-11 18:31:56 +02:00
raysan5 5a259fa10f WARNING: REMOVED: DrawTextRec() and DrawTextRecEx()
- 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.
2021-08-11 18:31:32 +02:00
Tommi Sinivuo 0ba49cce45
Add *.so.* to .gitignore to ignore build artifacts (#1912)
When building a shared Raylib library on Linux, the build process
produces 3 files: libraylib.so (symlink), libraylib.so.381 (symlink)
and libraylib.so.3.8.1 (the library).

Only the first one of these (.so) is currently ignored by Git.
Adding *.so.* to .gitinore makes Git ignore the rest of them as
well.
2021-08-11 11:56:05 +02:00
raysan5 b54422c970 Merge branch 'master' of https://github.com/raysan5/raylib 2021-08-10 21:32:29 +02:00
Ryan Roden-Corrent ef9fdd0fa5
Document Get{Key,Char}Pressed return value. (#1909)
I think it is useful to know what the empty behavior is in cases where
you are enumerating key presses (e.g. implementing "press any key to
continue").
2021-08-10 18:38:32 +02:00
raysan5 e3f0a11053 Update CHANGELOG 2021-08-10 17:48:31 +02:00
raysan5 311fe8f35b Replaced TABS by spaces 2021-08-08 21:09:11 +02:00
raysan5 a135d9c25d REVIEWED: Avoid conflict with bool 2021-08-08 13:23:04 +02:00
raysan5 ee72497eef REVIEWED: Some warnings... 2021-08-08 13:02:51 +02:00
raysan5 5e63cd3c97 ADDED: GenMeshCone() #1903 2021-08-08 11:29:24 +02:00
Ryan Roden-Corrent e6fe8169c2
Fix Makefile to build WASM examples. (#1906)
* 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>
2021-08-07 23:30:48 +02:00
raysan5 7ca9131fd4 Update rlgl_standalone.c 2021-08-07 11:58:39 +02:00
Ray 07e0b10515
Added rayex, elixir binding 2021-08-07 11:28:35 +02:00
raysan5 aa67903f96 Improve rlgl description 2021-07-31 19:58:30 +02:00
raysan5 5b6d83b533 REVIEWED: rlgl defines for consistency 2021-07-31 19:46:44 +02:00
raysan5 3e75a2109d REVIEWED: rlgl module header info 2021-07-31 19:08:13 +02:00
raysan5 7013e60926 Update models_rlgl_solar_system.c 2021-07-31 18:44:07 +02:00
raysan5 559f1919c6 REVIEWED: Improved font loading info 2021-07-31 18:41:44 +02:00
raysan5 73c8ddc8bf REVIEWED: raylib_opengl_interop 2021-07-31 18:36:06 +02:00
raysan5 b805754aa1 REVIEWED: Avoid bool type collisions 2021-07-31 18:10:26 +02:00
raysan5 0f8cfd6031 Update rlgl_standalone.c 2021-07-30 13:52:00 +02:00
raysan5 dffd1435e9 Revert "REVIEWED: Avoid UBSAN warnings #1891"
This reverts commit a8e9e1387f.
2021-07-30 13:50:33 +02:00
raysan5 a8e9e1387f REVIEWED: Avoid UBSAN warnings #1891 2021-07-30 13:47:21 +02:00
raysan5 1613057881 Update raudio.c 2021-07-30 13:45:01 +02:00
raysan5 b4fddf146b REVIEWED: Added new mechanism to avoid data types collision between modules that share same data types and can be used in standalone mode 2021-07-30 13:44:52 +02:00
raysan5 aeb1a0da84 REVERTED: Removed the need for `rlMatrix`
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.
2021-07-30 12:54:54 +02:00
raysan5 71373ee524 Update Makefile 2021-07-30 12:48:09 +02:00
raysan5 1cc25d1a2d Review include path that was breaking the build 2021-07-30 12:14:31 +02:00
raysan5 bd70a22412 Review some issues 2021-07-30 11:56:14 +02:00
raysan5 8b7f43f89b WARNING: BREAKING CHANGE: rlgl complete decoupling from raylib -WIP-
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
2021-07-29 21:57:50 +02:00
raysan5 58e9a0894f Reviewed some functions to avoid calling other functions 2021-07-29 21:50:50 +02:00
iskolbin 6ef3ab3d3a
impoves raylib_parser: makes it generic, adds -d key for functions define (RLAPI for raylib.h), increases maxiumum number of fields in structs and values in enums, doubles max length of struct field names; split float3/float16 struct typedefs in raymath to allow parser to process the file (#1901) 2021-07-29 20:37:44 +02:00