Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/glid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class Glid {
GLuint id;

// Required by Visual Studio to make it truly noncopyable
Glid(Glid&) /* = delete*/;
Glid& operator= (Glid&) /* = delete*/;
Glid(const Glid&) /* = delete*/;
Glid& operator= (const Glid&) /* = delete*/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird. Why was it like that before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, I think you would have added those as I don't use VS. I thought I had already 'fixed' that issue on master though. Still, it's definitely fixed now

};

}
23 changes: 23 additions & 0 deletions src/vertexArray.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once
#include "glid.hpp"
namespace gldr{
struct VertexArray{
void bind() const{
if(vaoID.get()){
gl::BindVertexArray(vaoID.get());
}
}

static GLuint create(){
GLuint id;
gl::GenVertexArrays(1, &id);
return id;
}

static void destroy(GLuint id){
gl::DeleteVertexArrays(1, &id);
}
private:
Glid<VertexArray> vaoID;
};
}