
Canvas contains the RenderTexture2D contains the Tree and now it's eazy to add more modules
19 lines
270 B
C++
19 lines
270 B
C++
#include "raylib.h"
|
|
#include "Tree.hpp"
|
|
|
|
class Canvas
|
|
{
|
|
|
|
public:
|
|
Canvas() = default;
|
|
~Canvas() = default;
|
|
void init(int size);
|
|
void newGen();
|
|
void draw(Rectangle dest, float rotation);
|
|
void deinit();
|
|
|
|
private:
|
|
Tree tree;
|
|
RenderTexture2D target = {0};
|
|
};
|