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.

61 line
2.1 KiB

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