diff options
| author | raysan5 <raysan5@gmail.com> | 2013-11-23 13:30:54 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2013-11-23 13:30:54 +0100 |
| commit | ccf26080915d5487dfb2e5fdb79c2bc2893b7454 (patch) | |
| tree | e7a4856dbea9eac3d356533260b37ce812d5f6e1 /examples/ex04a_textures.c | |
| parent | 7635e9c79ff2ed581942b61ca6cebac73712ecca (diff) | |
| download | raylib-ccf26080915d5487dfb2e5fdb79c2bc2893b7454.tar.gz raylib-ccf26080915d5487dfb2e5fdb79c2bc2893b7454.zip | |
Replaced tab by 4 spaces and adjust text
Diffstat (limited to 'examples/ex04a_textures.c')
| -rw-r--r-- | examples/ex04a_textures.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/examples/ex04a_textures.c b/examples/ex04a_textures.c index 5c2bf650..e0457c0a 100644 --- a/examples/ex04a_textures.c +++ b/examples/ex04a_textures.c @@ -1,11 +1,11 @@ /******************************************************************************************* * -* raylib example 04a - Texture loading and drawing +* raylib example 04a - Texture loading and drawing * -* This example has been created using raylib 1.0 (www.raylib.com) -* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * -* Copyright (c) 2013 Ramon Santamaria (Ray San - raysan@raysanweb.com) +* Copyright (c) 2013 Ramon Santamaria (Ray San - raysan@raysanweb.com) * ********************************************************************************************/ @@ -13,45 +13,45 @@ int main() { - int screenWidth = 800; - int screenHeight = 450; - - // Initialization - //--------------------------------------------------------- - InitWindow(screenWidth, screenHeight, "raylib example 04a - texture loading and drawing"); // Window and context initialization - - // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) - Texture2D texture = LoadTexture("resources/raylib_logo.png"); // Texture loading - //---------------------------------------------------------- - + int screenWidth = 800; + int screenHeight = 450; + + // Initialization + //--------------------------------------------------------- + InitWindow(screenWidth, screenHeight, "raylib example 04a - texture loading and drawing"); + + // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) + Texture2D texture = LoadTexture("resources/raylib_logo.png"); // Texture loading + //---------------------------------------------------------- + // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key + while (!WindowShouldClose()) // Detect window close button or ESC key { - // Update - //----------------------------------------------------- - // TODO: Update your variables here - //----------------------------------------------------- - - // Draw - //----------------------------------------------------- - BeginDrawing(); - - ClearBackground(RAYWHITE); - - DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2, WHITE); - - DrawText("this IS a texture!", 360, 370, 10, 1, GRAY); - + // Update + //----------------------------------------------------- + // TODO: Update your variables here + //----------------------------------------------------- + + // Draw + //----------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2, WHITE); + + DrawText("this IS a texture!", 360, 370, 10, 1, GRAY); + EndDrawing(); - //----------------------------------------------------- + //----------------------------------------------------- } - // De-Initialization - //--------------------------------------------------------- - UnloadTexture(texture); // Texture unloading - - CloseWindow(); // Close window and OpenGL context - //---------------------------------------------------------- - + // De-Initialization + //--------------------------------------------------------- + UnloadTexture(texture); // Texture unloading + + CloseWindow(); // Close window and OpenGL context + //---------------------------------------------------------- + return 0; }
\ No newline at end of file |
