diff options
Diffstat (limited to 'examples/src/shapes/shapes_basic_shapes.c')
| -rw-r--r-- | examples/src/shapes/shapes_basic_shapes.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/src/shapes/shapes_basic_shapes.c b/examples/src/shapes/shapes_basic_shapes.c index 4b7cc26..67eea9d 100644 --- a/examples/src/shapes/shapes_basic_shapes.c +++ b/examples/src/shapes/shapes_basic_shapes.c @@ -39,26 +39,27 @@ int main() DrawText("some basic shapes available on raylib", 20, 20, 20, DARKGRAY); - DrawLine(18, 42, screenWidth - 18, 42, BLACK); - DrawCircle(screenWidth/4, 120, 35, DARKBLUE); - DrawCircleGradient(screenWidth/4, 220, 60, GREEN, SKYBLUE); - DrawCircleLines(screenWidth/4, 340, 80, DARKBLUE); DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED); + DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD); - DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); DrawTriangle((Vector2){screenWidth/4*3, 80}, (Vector2){screenWidth/4*3 - 60, 150}, (Vector2){screenWidth/4*3 + 60, 150}, VIOLET); + DrawPoly((Vector2){screenWidth/4*3, 320}, 6, 80, 0, BROWN); + + DrawCircleGradient(screenWidth/4, 220, 60, GREEN, SKYBLUE); + + // NOTE: We draw all LINES based shapes together to optimize internal drawing, + // this way, all LINES are rendered in a single draw pass + DrawLine(18, 42, screenWidth - 18, 42, BLACK); + DrawCircleLines(screenWidth/4, 340, 80, DARKBLUE); DrawTriangleLines((Vector2){screenWidth/4*3, 160}, (Vector2){screenWidth/4*3 - 20, 230}, (Vector2){screenWidth/4*3 + 20, 230}, DARKBLUE); - - DrawPoly((Vector2){screenWidth/4*3, 320}, 6, 80, 0, BROWN); - EndDrawing(); //---------------------------------------------------------------------------------- } |
