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

viewport changes

This commit is contained in:
milek7
2019-03-12 19:21:33 +01:00
parent e85d588851
commit dba2308997
8 changed files with 86 additions and 74 deletions

View File

@@ -42,6 +42,12 @@ void gl::buffer::unbind(targets target)
binding_points[target] = 0;
}
void gl::buffer::unbind()
{
for (size_t i = 0; i < sizeof(binding_points) / sizeof(GLuint); i++)
unbind((targets)i);
}
gl::buffer::buffer()
{
glGenBuffers(1, *this);

View File

@@ -37,6 +37,7 @@ namespace gl
void bind(targets target);
void bind_base(targets target, GLuint index);
static void unbind(targets target);
static void unbind();
void allocate(targets target, int size, GLenum hint);
void upload(targets target, const void *data, int offset, int size);