From 9ececcbab7d88b103a035441848c565d13ae28bf Mon Sep 17 00:00:00 2001 From: KeksNino Date: Sat, 30 Aug 2025 02:21:04 +0200 Subject: [PATCH] push src folder --- .gitignore | 1 - src/main.cpp | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/main.cpp diff --git a/.gitignore b/.gitignore index 5f1e3f6..c76a9df 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,5 @@ # Dependency files docs -src vendor include diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..6722d44 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,31 @@ +#include + +int main() { + int screenWidth = 800; + int screenHeight = 450; + + raylib::Window window(screenWidth, screenHeight, "raylib-cpp - basic window"); + raylib::Texture logo("raylib_logo.png"); + + SetTargetFPS(60); + + while (!window.ShouldClose()) + { + BeginDrawing(); + + window.ClearBackground(RAYWHITE); + + DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); + + // Object methods. + logo.Draw( + screenWidth / 2 - logo.GetWidth() / 2, + screenHeight / 2 - logo.GetHeight() / 2); + + EndDrawing(); + } + + // UnloadTexture() and CloseWindow() are called automatically. + + return 0; +}