#ifndef SOFA_CANVAS_H
#define SOFA_CANVAS_H
#include "color.h"
#include <glad/gl.h>
#define P2I(w, x, y) (w * y) + x
typedef struct {
color_t* data;
GLint w, h;
} canvas_t;
canvas_t canvas_create(GLint w, GLint h);
void canvas_clear(canvas_t* self, color_t clear);
void canvas_destroy(canvas_t* self);
#endif