The color macros don't work properly in C++98, because they require
aggregate initialzation, which is a C++11 feature. So, explicitly state
how to fix this issue, instead of letting the compiler give a more vague
error message like:
main.cpp:8:23: error: expected '(' for function-style cast or type construction
ClearBackground(BLACK);
^~~~~
/opt/homebrew/Cellar/raylib/4.5.0/include/raylib.h:179:35: note: expanded from macro 'BLACK'
#define BLACK CLITERAL(Color){ 0, 0, 0, 255 } // Black
NOTE: Don't use this check with MSVC because by default, it reports
199711L regardless of any C++ version passed on command line
Only passing `/Zc:__cplusplus` will make MSVC set this correctly
see: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus
* Add GenImageGradientSquare to allow square gradients
* Fix GenImageGradientSquare and add to textures_image_generation example
* Remove params from GenImageGradientSquare
* Use RL_QUADS/RL_TRIANGLES for single-pixel drawing
Addresses problem mentioned in
https://github.com/raysan5/raylib/issues/2744#issuecomment-1273568263
(in short: when drawing pixels using DrawPixel{,V} in camera mode,
upscaled pixel becomes a line instead of bigger pixel)
* [rtextures] Fixed scaling down in ImageTextEx
Closes#2755
* Added global audio processor
* Renamed struct member to follow naming conventions
* Added example for AttachAudioMixedProcessor
* core functionality CAMERA_FREE
* fix example
* add remaining camera modes
* add view bobbing
* view bobbing
* catch curser in SetCameraMode
* adjust examples
* fix compilation on linux
* fix example text_draw_3d
* actually fix text_draw_3d
* Updated camera API
* Improve Vector3RotateByAxisAngle() function
* remove camera.mode dependency from low-level functions
* remove camera.mode from struct
* fixes after rebase
* adjust examples for new UpdateCamera function
* adjust example models_loading_m3d
---------
Co-authored-by: Ray <raysan5@gmail.com>
These IsReady() functions provide a method in order to verify whether or not the object was loaded successfully. They're useful to make sure the assets are there prior to using them.
Ran into an issue in raylib-cpp where a user was using raylib 4.5-dev, even though the library currently only targets 4.2. With having RAYLIB_VERSION_MAJOR and RAYLIB_VERSION_MINOR, we will be able to target different versions of raylib in different ways, via C preprocessor conditionals.
For example:
``` c
newColor = ColorTint(BLUE, RED);
TraceLog(LOG_INFO, "The color should be tinted, but this isn't supported in ryalib <= 4.2");
```
WARNING: It could require further review of `GamepadThread()` function where `js_event gamepadEvent.number` detecting current pressed button could generate a missmatch with index 0 (reserved for button unknow). Or maybe `0` could just be `GAMEPAD_BUTTON_NONE`? In that case, consistency with other inputs should be carefully considered...
Those two functions have been moved to a new example: `models_draw_cube_texture`. The reasons for this decision:
- Function inflexibility: Many users with the need to draw a textured cube could need to customize the texture applied to every face, that function did not allow that kind of functionality.
- rlgl functionality exposure: The implementation exposed will teach users how to implement custom textured triangles drawing.
This function can be easely replicated using `DrawtexturePro()` and actually it was doing some assumptions not transparent to the user. Even the function name was confusing. No example was available for it and actually noone requested one example.
- ADDED: `GetCodepointPrevious()`
- RENAMED: `GetCodepoint()` -> `GetCodepointNext()`, actually, reimplemented
- `GetCodepoint()` has been kept for the moment, for compatibility and also because implementation is different
- RENAMED: `TextCodepointsToUTF8()` to `LoadUTF8()`, simpler name and more aligned with raylib conventions (functions loading memory start with Load*()), parameters should be descriptive of functionailty.
- ADDED: `UnloadUTF8()`, aligned with `LoadUTF8()` to avoid allocators issues.
This adds `ImageDrawCircleLines()` and `ImageDrawCircleLinesV()` to draw outlines of circles, and updates `ImageDrawCircle()` draw a filled circle to match the effect of `DrawCircle()` and `DrawCircleLines()`.