Sfoglia il codice sorgente

Review buffer limits on rectangle drawing

raysan5 5 anni fa
parent
commit
cdbe1b6190
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/shapes.c

+ 2 - 0
src/shapes.c

@@ -618,6 +618,8 @@ void DrawRectangleRec(Rectangle rec, Color color)
 // Draw a color-filled rectangle with pro parameters
 void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color)
 {
+    if (rlCheckBufferLimit(4)) rlglDraw();
+    
     rlEnableTexture(GetShapesTexture().id);
 
     rlPushMatrix();