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

przesadziłem?

This commit is contained in:
VB
2017-07-03 21:53:59 +02:00
parent 0574b3f758
commit fee95ed0ba

View File

@@ -130,6 +130,7 @@ opengl_vbogeometrybank::create_( geometry_handle const &Geometry ) {
// kiss the existing buffer goodbye, new overall data size means we'll be making a new one
delete_buffer();
bind_streams(stream::none);
glGenVertexArrays(1, &m_vao);
}
@@ -173,7 +174,6 @@ opengl_vbogeometrybank::draw_( geometry_handle const &Geometry, unsigned int con
bind_buffer();
// NOTE: we're using static_draw since it's generally true for all we have implemented at the moment
// TODO: allow to specify usage hint at the object creation, and pass it here
m_activestreams = stream::none;
::glBufferData(
GL_ARRAY_BUFFER,
datasize * sizeof( basic_vertex ),
@@ -224,6 +224,7 @@ opengl_vbogeometrybank::bind_buffer() {
glBindVertexArray(m_vao);
::glBindBuffer( GL_ARRAY_BUFFER, m_buffer );
m_activebuffer = m_buffer;
bind_streams(stream::none);
}
void