|  | /******************************************************************************************* | 
						
						
							|  | * | 
						
						
							|  | *   raylib test - Texture loading with mipmaps, mipmaps generation | 
						
						
							|  | * | 
						
						
							|  | *   This test has been created using raylib 1.1 (www.raylib.com) | 
						
						
							|  | *   raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) | 
						
						
							|  | * | 
						
						
							|  | *   Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com) | 
						
						
							|  | * | 
						
						
							|  | ********************************************************************************************/ | 
						
						
							|  | 
 | 
						
						
							|  | #include "raylib.h" | 
						
						
							|  |  | 
						
						
							|  | int main() | 
						
						
							|  | { | 
						
						
							|  |     // Initialization | 
						
						
							|  |     //-------------------------------------------------------------------------------------- | 
						
						
							|  |     int screenWidth = 800; | 
						
						
							|  |     int screenHeight = 450; | 
						
						
							|  | 
 | 
						
						
							|  |     InitWindow(screenWidth, screenHeight, "raylib test - texture mipmaps"); | 
						
						
							|  |      | 
						
						
							|  |     Image image = LoadImage("resources/raylib_logo.png"); | 
						
						
							|  |     Texture2D texture = CreateTexture(image, true); | 
						
						
							|  |      | 
						
						
							|  |     // NOTE: With OpenGL 3.3 mipmaps generation works great (automatic generation) | 
						
						
							|  |     // NOTE: With OpenGL 1.1 mipmaps generation works great too! (manual generation) | 
						
						
							|  |      | 
						
						
							|  |     //-------------------------------------------------------------------------------------- | 
						
						
							|  |      | 
						
						
							|  |     // Main game loop | 
						
						
							|  |     while (!WindowShouldClose())    // Detect window close button or ESC key | 
						
						
							|  |     { | 
						
						
							|  |         // Update | 
						
						
							|  |         //---------------------------------------------------------------------------------- | 
						
						
							|  |         // TODO: Update your variables here | 
						
						
							|  |         //---------------------------------------------------------------------------------- | 
						
						
							|  |          | 
						
						
							|  |         // Draw | 
						
						
							|  |         //---------------------------------------------------------------------------------- | 
						
						
							|  |         BeginDrawing(); | 
						
						
							|  |          | 
						
						
							|  |             ClearBackground(RAYWHITE); | 
						
						
							|  |              | 
						
						
							|  |             DrawTexture(texture, 0, 0, WHITE); | 
						
						
							|  |         | 
						
						
							|  |         EndDrawing(); | 
						
						
							|  |         //---------------------------------------------------------------------------------- | 
						
						
							|  |     } | 
						
						
							|  | 
 | 
						
						
							|  |     // De-Initialization | 
						
						
							|  |     //-------------------------------------------------------------------------------------- | 
						
						
							|  |     UnloadTexture(texture);       // Texture unloading | 
						
						
							|  |      | 
						
						
							|  |     CloseWindow();                // Close window and OpenGL context | 
						
						
							|  |     //-------------------------------------------------------------------------------------- | 
						
						
							|  |      | 
						
						
							|  |     return 0; | 
						
						
							|  | } |