push src folder
This commit is contained in:
@@ -42,6 +42,5 @@
|
|||||||
|
|
||||||
# Dependency files
|
# Dependency files
|
||||||
docs
|
docs
|
||||||
src
|
|
||||||
vendor
|
vendor
|
||||||
include
|
include
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#include <raylib-cpp.hpp>
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user