render implement thread, wrap GL commands into tasks

This commit is contained in:
2019-07-06 22:25:07 +02:00
parent db27334ce5
commit 0012e2ce9b
18 changed files with 1252 additions and 904 deletions

View File

@@ -25,22 +25,9 @@ public:
bool create_buffers(GLvoid* vertices, int vsize);
void draw_fill() const;
void draw_stroke() const;
void destroy()
{
if (buffers[0] || buffers[1])
glDeleteBuffers(2, buffers);
#if USE_VBO
if (arrays[0] || arrays[1])
glDeleteVertexArrays(2, arrays);
#endif // USE_VBO
buffers[0] = buffers[1] = 0;
arrays[0] = arrays[1] = 0;
}
void destroy();
virtual bool create_attrib() { return true; };
~Shape()
{
destroy();
}
~Shape();
protected:
glm::vec2 quad_mid_point(glm::vec2 a, glm::vec2 b, glm::vec2 c, glm::vec2 d)
{