Nikola Petrov d7afa1afc9 Extract RenderTexture from Canvas
For easyer managment of texures and potential buffers
2024-08-12 22:39:52 +02:00

29 lines
477 B
C++

#include <array>
#include "canvas/Canvas.hpp"
class App
{
public:
App() = default;
~App() = default;
void init(int screenWidth, int screenHeight);
void update();
void draw();
void deinit();
private:
int pos = 0;
int screenWidth, screenHeight;
Canvas canvas;
std::array< RenderTexture2D, 2> canvasTexure = { 0 };
float rotation = 0.0f;
Rectangle destB;
Rectangle destA;
Vector2 mouseStart;
float len;
float ofset;
bool validHit = false;
};