This is a 2D rendering library for fast protoryping (or just playing around) inspired by JavaScript canvas. It runs on OpenGL (Ra library to be exact). For now CanvasLib only supports one instance of canvas (one window). Here is a basic usage example:
#include <CanvasLib/CanvasLib.hpp>
auto main() -> int
{
[&canvas](double fpsScale)
{
canvas.setFillColor(canv::Colors::green);
canvas.drawRectangle(100, 100, 50, 150);
});
canvas.start();
}
The main class representing the canvas. To use it you only need to:
Definition CanvasLib.hpp:55
void setUpdateFunction(std::function< void(double)> upd)
sets update function that will be called every frame