mirror of
https://github.com/guezoloic/LearnOpenGL.git
synced 2026-01-25 09:34:16 +00:00
feat(VAO): add VAO config
This commit is contained in:
23
inc/VAO.hpp
Executable file
23
inc/VAO.hpp
Executable file
@@ -0,0 +1,23 @@
|
||||
#ifndef VAO_HPP
|
||||
#define VAO_HPP
|
||||
|
||||
#include <gl/glew.h>
|
||||
|
||||
class VAO
|
||||
{
|
||||
private:
|
||||
unsigned int id;
|
||||
|
||||
public:
|
||||
VAO();
|
||||
~VAO();
|
||||
|
||||
void bind();
|
||||
void unbind();
|
||||
|
||||
void setAttributePointer(GLuint index, GLuint size, GLenum type, GLsizei stride, const void* offset);
|
||||
void drawElement(GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
void drawArray(GLenum mode, GLint first, GLsizei count);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user