* fixed compiling & added stuff
This commit is contained in:
parent
d24d5357b8
commit
c482a3f779
6 changed files with 381 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#include <include/glclasses.h>
|
||||
|
||||
#define TBufferObject_(pre, post) template <GLenum T> pre BufferObject<T>::post
|
||||
#define TBufferObject_(pre, post) template <GLenum T> pre endofthejedi::BufferObject<T>::post
|
||||
#define TBufferObject(...) TBufferObject_(__VA_ARGS__)
|
||||
|
||||
TBufferObject(, BufferObject)() {
|
||||
|
|
@ -35,4 +35,19 @@ TBufferObject(void, unmap)() {
|
|||
//todo
|
||||
}
|
||||
|
||||
endofthejedi::VAO::VAO() {
|
||||
glGenVertexArrays(1, &m_name);
|
||||
}
|
||||
|
||||
endofthejedi::VAO::~VAO() {
|
||||
glDeleteVertexArrays(1, &m_name);
|
||||
}
|
||||
|
||||
void endofthejedi::VAO::bind() {
|
||||
glBindVertexArray(m_name);
|
||||
}
|
||||
|
||||
void endofthejedi::VAO::fill(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* pointer) {
|
||||
glEnableVertexAttribArray(index);
|
||||
glVertexAttribPointer(index, size, GL_FLOAT, normalized, stride, pointer);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue