started implementing dynamic widget allocation by xml tag

This commit is contained in:
2017-01-29 17:42:23 +00:00
parent 7436706b37
commit 16c1b6481e
10 changed files with 94 additions and 46 deletions

View File

@@ -1,5 +1,4 @@
#pragma once
#include "layout.h"
class Shape
{
@@ -10,7 +9,7 @@ protected:
GLvoid* ioff[2]{ 0 };
struct vertex_t { glm::vec4 pos; glm::vec2 uvs; };
public:
att::AttrubutesMap attribs;
// att::AttrubutesMap attribs;
bool create_buffers(GLvoid* idx, GLvoid* vertices, int isize, int vsize);
void draw_fill() const;
void draw_stroke() const;
@@ -57,6 +56,7 @@ public:
create_impl(w, h, div, idx, vertices);
return create_buffers(idx, vertices, sizeof(idx), sizeof(vertices));
}
/*
bool create(att::Divisions divisions, att::Width w, att::Height h)
{
const int div = divisions.value;
@@ -80,6 +80,7 @@ public:
const auto d = get_attribute(att::Divisions(1));
return create(d, w, h);
}
*/
};
class RectShape : public Shape