[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:
parent
99f22a47ff
commit
ad64a43b34
2 changed files with 126 additions and 99 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue