16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 13:59:19 +02:00

make vao mode selectable at runtime (enabled by default, disabled by multiviewports)

This commit is contained in:
milek7
2019-08-08 15:48:55 +02:00
parent 37fea6db7a
commit 613bdb91d9
4 changed files with 52 additions and 41 deletions

View File

@@ -6,7 +6,7 @@
namespace gl
{
class vao : public bindable<vao>
class vao : object, public bindable<vao>
{
struct attrib_params {
// TBD: should be shared_ptr? (when buffer is destroyed by owner VAO could still potentially exist)
@@ -23,15 +23,15 @@ namespace gl
std::vector<attrib_params> params;
public:
//vao();
//~vao();
vao();
~vao();
void setup_attrib(buffer &buffer, int attrib, int size, int type, int stride, int offset);
void setup_ebo(buffer &ebo);
//using bindable::bind;
void bind();
static void unbind();
//static void bind(GLuint i);
static bool use_vao;
};
}