mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 19:29:19 +02:00
przesadziłem?
This commit is contained in:
@@ -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
|
// kiss the existing buffer goodbye, new overall data size means we'll be making a new one
|
||||||
delete_buffer();
|
delete_buffer();
|
||||||
|
|
||||||
|
bind_streams(stream::none);
|
||||||
glGenVertexArrays(1, &m_vao);
|
glGenVertexArrays(1, &m_vao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,7 +174,6 @@ opengl_vbogeometrybank::draw_( geometry_handle const &Geometry, unsigned int con
|
|||||||
bind_buffer();
|
bind_buffer();
|
||||||
// NOTE: we're using static_draw since it's generally true for all we have implemented at the moment
|
// 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
|
// TODO: allow to specify usage hint at the object creation, and pass it here
|
||||||
m_activestreams = stream::none;
|
|
||||||
::glBufferData(
|
::glBufferData(
|
||||||
GL_ARRAY_BUFFER,
|
GL_ARRAY_BUFFER,
|
||||||
datasize * sizeof( basic_vertex ),
|
datasize * sizeof( basic_vertex ),
|
||||||
@@ -224,6 +224,7 @@ opengl_vbogeometrybank::bind_buffer() {
|
|||||||
glBindVertexArray(m_vao);
|
glBindVertexArray(m_vao);
|
||||||
::glBindBuffer( GL_ARRAY_BUFFER, m_buffer );
|
::glBindBuffer( GL_ARRAY_BUFFER, m_buffer );
|
||||||
m_activebuffer = m_buffer;
|
m_activebuffer = m_buffer;
|
||||||
|
bind_streams(stream::none);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user