add initial Array class
This commit is contained in:
1 parent
e9cdd72ffc
commit
f8de8368bb
3 files changed
+61
-1
No files matched your search
+2
-1
@@ -1,9 +1,10 @@
|
||||
#ifndef GLCXX_HPP
|
||||
#define GLCXX_HPP
|
||||
|
||||
#include "glcxx/Array.hpp"
|
||||
#include "glcxx/Buffer.hpp"
|
||||
#include "glcxx/Error.hpp"
|
||||
#include "glcxx/Program.hpp"
|
||||
#include "glcxx/Shader.hpp"
|
||||
#include "glcxx/Error.hpp"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef GLCXX_ARRAY_HPP
|
||||
#define GLCXX_ARRAY_HPP
|
||||
|
||||
#include "glcxx/gl.hpp"
|
||||
|
||||
namespace glcxx
|
||||
{
|
||||
class Array
|
||||
{
|
||||
public:
|
||||
Array();
|
||||
|
||||
~Array();
|
||||
|
||||
void create();
|
||||
|
||||
void bind()
|
||||
{
|
||||
glBindVertexArray(m_id);
|
||||
}
|
||||
|
||||
GLuint id() const { return m_id; }
|
||||
|
||||
bool valid() const { return m_id > 0u; }
|
||||
|
||||
protected:
|
||||
GLuint m_id;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user