Extract RenderTexture from Canvas

For easyer managment of texures and potential buffers
This commit is contained in:
Nikola Petrov
2024-08-12 22:39:52 +02:00
parent 2f4ad253a1
commit d7afa1afc9
6 changed files with 27 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
#include <vector>
#include <array>
#include "canvas/Canvas.hpp"
class App
@@ -15,7 +15,8 @@ public:
private:
int pos = 0;
int screenWidth, screenHeight;
std::vector<Canvas> canvases;
Canvas canvas;
std::array< RenderTexture2D, 2> canvasTexure = { 0 };
float rotation = 0.0f;
Rectangle destB;
Rectangle destA;