// // Created by saintruler on 04.05.19. // #ifndef OPENGLTEST_CANVAS_H #define OPENGLTEST_CANVAS_H #include #include #include #include #include "gpu/CalculateCanvas.h" #include struct Color { unsigned int r = 0, g = 0, b = 0; }; class Canvas { public: Canvas(int width, int height, Point* points, int nPoints); void SetPixel(int x, int y, Color color); void UpdateTexture(); void DrawTexture(); void DeleteCanvas(); private: int width, height, nPoints; unsigned char* canvas; unsigned int texture; Point* points; unsigned int VBO, VAO, EBO; Shader shader = Shader("4.1.texture.vs", "4.1.texture.fs"); }; #endif //OPENGLTEST_CANVAS_H