[rshapes] Expose shapes drawing texture and rectangle (#3677)

* provide access to the shape texture so that shapes can be extended outside of raylib with the same optimizations as internal raylib functions.

* PR feedback, comply with C standards

* oops
This commit is contained in:
Jeffery Myers 2023-12-28 06:40:03 -08:00 committed by GitHub
parent 99f22a47ff
commit ad64a43b34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 126 additions and 99 deletions

View file

@ -1220,6 +1220,8 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f
// NOTE: It can be useful when using basic shapes and one single font,
// defining a font char white rectangle would allow drawing everything in a single draw call
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
RLAPI Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
// Basic shapes drawing functions
RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel