|
|
@ -1,62 +1,62 @@ |
|
|
|
/*******************************************************************************************-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm
|
|
|
|
* |
|
|
|
* raylib [core] example - Basic window |
|
|
|
* |
|
|
|
* Welcome to raylib! |
|
|
|
* |
|
|
|
* To test examples, just press F6 and execute raylib_compile_execute script |
|
|
|
* Note that compiled executable is placed in the same folder as .c file |
|
|
|
* |
|
|
|
* You can find all basic examples on C:\raylib\raylib\examples folder or |
|
|
|
* raylib official webpage: www.raylib.com |
|
|
|
* |
|
|
|
* Enjoy using raylib. :) |
|
|
|
* |
|
|
|
* 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-2016 Ramon Santamaria (@raysan5) |
|
|
|
* |
|
|
|
********************************************************************************************/ |
|
|
|
|
|
|
|
#include "raylib.h"
|
|
|
|
|
|
|
|
int main() |
|
|
|
{ |
|
|
|
c1">// Initialization
|
|
|
|
c1">//--------------------------------------------------------------------------------------
|
|
|
|
int screenWidth = 800; |
|
|
|
int screenHeight = 450; |
|
|
|
|
|
|
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window"); |
|
|
|
|
|
|
|
SetTargetFPS(60); |
|
|
|
c1">//--------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
c1">// Main game loop
|
|
|
|
while (!WindowShouldClose()) c1">// Detect window close button or ESC key
|
|
|
|
{ |
|
|
|
c1">// Update
|
|
|
|
c1">//----------------------------------------------------------------------------------
|
|
|
|
c1">// TODO: Update your variables here
|
|
|
|
c1">//----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
c1">// Draw
|
|
|
|
c1">//----------------------------------------------------------------------------------
|
|
|
|
BeginDrawing(); |
|
|
|
|
|
|
|
ClearBackground(RAYWHITE); |
|
|
|
|
|
|
|
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); |
|
|
|
|
|
|
|
EndDrawing(); |
|
|
|
c1">//----------------------------------------------------------------------------------
|
|
|
|
} |
|
|
|
|
|
|
|
c1">// De-Initialization
|
|
|
|
c1">//--------------------------------------------------------------------------------------
|
|
|
|
CloseWindow(); c1">// Close window and OpenGL context
|
|
|
|
c1">//--------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
/*******************************************************************************************-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm |
|
|
|
* |
|
|
|
* raylib [core] example - Basic window |
|
|
|
* |
|
|
|
* Welcome to raylib! |
|
|
|
* |
|
|
|
* To test examples, just press F6 and execute raylib_compile_execute script |
|
|
|
* Note that compiled executable is placed in the same folder as .c file |
|
|
|
* |
|
|
|
* You can find all basic examples on C:\raylib\raylib\examples folder or |
|
|
|
* raylib official webpage: www.raylib.com |
|
|
|
* |
|
|
|
* Enjoy using raylib. :) |
|
|
|
* |
|
|
|
* 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-2016 Ramon Santamaria (@raysan5) |
|
|
|
* |
|
|
|
********************************************************************************************/ |
|
|
|
|
|
|
|
#include "raylib.h" |
|
|
|
|
|
|
|
int main() |
|
|
|
{ |
|
|
|
o">// Initialization |
|
|
|
o">//-------------------------------------------------------------------------------------- |
|
|
|
int screenWidth = 800; |
|
|
|
int screenHeight = 450; |
|
|
|
|
|
|
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window"); |
|
|
|
|
|
|
|
SetTargetFPS(60); |
|
|
|
o">//-------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
o">// Main game loop |
|
|
|
while (!WindowShouldClose()) o">// Detect window close button or ESC key |
|
|
|
{ |
|
|
|
o">// Update |
|
|
|
o">//---------------------------------------------------------------------------------- |
|
|
|
o">// TODO: Update your variables here |
|
|
|
o">//---------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
o">// Draw |
|
|
|
o">//---------------------------------------------------------------------------------- |
|
|
|
BeginDrawing(); |
|
|
|
|
|
|
|
ClearBackground(RAYWHITE); |
|
|
|
|
|
|
|
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); |
|
|
|
|
|
|
|
EndDrawing(); |
|
|
|
o">//---------------------------------------------------------------------------------- |
|
|
|
} |
|
|
|
|
|
|
|
o">// De-Initialization |
|
|
|
o">//-------------------------------------------------------------------------------------- |
|
|
|
CloseWindow(); o">// Close window and OpenGL context |
|
|
|
o">//-------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |