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.
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.
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
- 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.
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").
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
RENAMED: GetCodepoints() -> LoadCodepoints(), now codepoint array data is loaded dynamically instead of reusing a limited static buffer.
ADDED: UnloadCodepoints() to safely free loaded codepoints
RENAMED: GetNextCodepoint() -> GetCodepoint()
* core: added `GetMouseDelta()`
Thanks to previousPosition added by raysan it is now possible to create the GetMouseDelta() function.
Returns a Vector2 with the difference between the current and previous position of the mouse in a frame.
Useful for creating camera scrolling, among others.
* Added changes noted by raysan