diff options
| author | Ray <raysan5@gmail.com> | 2016-03-17 13:51:48 +0100 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-03-17 13:51:48 +0100 |
| commit | e2ba22ec596757d62f8b22cf8b722d68040f23d3 (patch) | |
| tree | 28b9e0ddfe60534b167dd659e27c4fa10288d329 /examples | |
| parent | 49df957058b2f602c7e6873fec0007fcd7a4dc4c (diff) | |
| download | raylib-e2ba22ec596757d62f8b22cf8b722d68040f23d3.tar.gz raylib-e2ba22ec596757d62f8b22cf8b722d68040f23d3.zip | |
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.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/core_3d_camera_first_person.c | 9 | ||||
| -rw-r--r-- | examples/core_3d_camera_first_person.png | bin | 18402 -> 18883 bytes | |||
| -rw-r--r-- | examples/core_3d_camera_free.c | 17 | ||||
| -rw-r--r-- | examples/core_3d_camera_free.png | bin | 25167 -> 25293 bytes | |||
| -rw-r--r-- | examples/core_3d_picking.c | 2 | ||||
| -rw-r--r-- | examples/shapes_basic_shapes.png | bin | 26439 -> 30382 bytes | |||
| -rw-r--r-- | examples/textures_srcrec_dstrec.png | bin | 48478 -> 47563 bytes |
7 files changed, 17 insertions, 11 deletions
diff --git a/examples/core_3d_camera_first_person.c b/examples/core_3d_camera_first_person.c index 16d388df..56e38a23 100644 --- a/examples/core_3d_camera_first_person.c +++ b/examples/core_3d_camera_first_person.c @@ -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(); //---------------------------------------------------------------------------------- diff --git a/examples/core_3d_camera_first_person.png b/examples/core_3d_camera_first_person.png Binary files differindex 9373da2d..7130b0a2 100644 --- a/examples/core_3d_camera_first_person.png +++ b/examples/core_3d_camera_first_person.png diff --git a/examples/core_3d_camera_free.c b/examples/core_3d_camera_free.c index 234c46b3..fa7ad85f 100644 --- a/examples/core_3d_camera_free.c +++ b/examples/core_3d_camera_free.c @@ -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(); //---------------------------------------------------------------------------------- diff --git a/examples/core_3d_camera_free.png b/examples/core_3d_camera_free.png Binary files differindex 17920620..8857a478 100644 --- a/examples/core_3d_camera_free.png +++ b/examples/core_3d_camera_free.png diff --git a/examples/core_3d_picking.c b/examples/core_3d_picking.c index 33eaed8a..da303107 100644 --- a/examples/core_3d_picking.c +++ b/examples/core_3d_picking.c @@ -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); diff --git a/examples/shapes_basic_shapes.png b/examples/shapes_basic_shapes.png Binary files differindex 03ecf2ec..a7d4a991 100644 --- a/examples/shapes_basic_shapes.png +++ b/examples/shapes_basic_shapes.png diff --git a/examples/textures_srcrec_dstrec.png b/examples/textures_srcrec_dstrec.png Binary files differindex 7459d6ec..9ea00fe4 100644 --- a/examples/textures_srcrec_dstrec.png +++ b/examples/textures_srcrec_dstrec.png |
