You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.0 KiB

  1. /*******************************************************************************************
  2. * raylib [core] example - Basic window
  3. *
  4. * Welcome to raylib!
  5. *
  6. * You can find all basic examples on C:\raylib\raylib\examples folder or
  7. * raylib official webpage: www.raylib.com
  8. *
  9. * Enjoy using raylib. :)
  10. *
  11. * This example has been created using raylib 1.0 (www.raylib.com)
  12. * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
  13. *
  14. * Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
  15. *
  16. ********************************************************************************************/
  17. #include "raylib.h"
  18. int main()
  19. {
  20. // Initialization
  21. //--------------------------------------------------------------------------------------
  22. int screenWidth = 800;
  23. int screenHeight = 450;
  24. InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
  25. SetTargetFPS(60);
  26. //--------------------------------------------------------------------------------------
  27. // Main game loop
  28. while (!WindowShouldClose()) // Detect window close button or ESC key
  29. {
  30. // Update
  31. //----------------------------------------------------------------------------------
  32. // TODO: Update your variables here
  33. //----------------------------------------------------------------------------------
  34. // Draw
  35. //----------------------------------------------------------------------------------
  36. BeginDrawing();
  37. ClearBackground(RAYWHITE);
  38. DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
  39. EndDrawing();
  40. //----------------------------------------------------------------------------------
  41. }
  42. // De-Initialization
  43. //--------------------------------------------------------------------------------------
  44. CloseWindow(); // Close window and OpenGL context
  45. //--------------------------------------------------------------------------------------
  46. return 0;
  47. }