diplomska_naloga/main.cpp
2024-03-03 22:31:15 +01:00

31 lines
563 B
C++

#include "raylib.h"
#include "Tree.hpp"
const int screenWidth = 800;
const int screenHeight = 800;
int main(void)
{
InitWindow(screenWidth, screenHeight, "raylib");
SetTargetFPS(60);
{
Tree tree(800);
tree.newTree();
Rectangle dest = {0, 0, screenWidth, screenHeight};
float rotation = 0.0f;
while (!WindowShouldClose())
{
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
{
tree.newTree();
}
BeginDrawing();
tree.draw(dest, rotation);
EndDrawing();
}
}
CloseWindow();
return 0;
}