Improved 2D-3D drawing

Depth test disabled for 2D and only used on 3D; consequently LINES vs
TRIANGLES vs QUADS buffers drawing order maters... but blending also
works ok.
This commit is contained in:
Ray 2016-03-17 13:51:48 +01:00
parent 49df957058
commit e2ba22ec59
11 changed files with 93 additions and 35 deletions

View file

@ -74,10 +74,13 @@ int main()
}
End3dMode();
DrawRectangle( 10, 10, 220, 70, Fade(SKYBLUE, 0.5f));
DrawRectangleLines( 10, 10, 220, 70, BLUE);
DrawText("First person camera default controls:", 20, 20, 10, GRAY);
DrawText("- Move with keys: W, A, S, D", 40, 50, 10, DARKGRAY);
DrawText("- Mouse move to look around", 40, 70, 10, DARKGRAY);
DrawText("First person camera default controls:", 20, 20, 10, BLACK);
DrawText("- Move with keys: W, A, S, D", 40, 40, 10, DARKGRAY);
DrawText("- Mouse move to look around", 40, 60, 10, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

View file

@ -59,13 +59,16 @@ int main()
DrawGrid(10, 1.0f);
End3dMode();
DrawText("Free camera default controls:", 20, 20, 10, GRAY);
DrawText("- Mouse Wheel to Zoom in-out", 40, 50, 10, DARKGRAY);
DrawText("- Mouse Wheel Pressed to Pan", 40, 70, 10, DARKGRAY);
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 90, 10, DARKGRAY);
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 110, 10, DARKGRAY);
DrawText("- Z to zoom to (0, 0, 0)", 40, 130, 10, DARKGRAY);
DrawRectangle( 10, 10, 320, 133, Fade(SKYBLUE, 0.5f));
DrawRectangleLines( 10, 10, 320, 133, BLUE);
DrawText("Free camera default controls:", 20, 20, 10, BLACK);
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY);
DrawText("- Mouse Wheel Pressed to Pan", 40, 60, 10, DARKGRAY);
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 80, 10, DARKGRAY);
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 100, 10, DARKGRAY);
DrawText("- Z to zoom to (0, 0, 0)", 40, 120, 10, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

@ -77,7 +77,7 @@ int main()
End3dMode();
DrawText("Try selecting the box with mouse!", 240, 10, 20, GRAY);
DrawText("Try selecting the box with mouse!", 240, 10, 20, DARKGRAY);
if(collision) DrawText("BOX SELECTED", (screenWidth - MeasureText("BOX SELECTED", 30)) / 2, screenHeight * 0.1f, 30, GREEN);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before After
Before After