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

potential vbo render path crash fix, minor bug fixes

This commit is contained in:
tmj-fstate
2019-02-19 14:48:35 +01:00
parent bc7df7fa59
commit bc60b5ac62
4 changed files with 26 additions and 21 deletions

View File

@@ -174,6 +174,7 @@ opengl_vbogeometrybank::draw_( gfx::geometry_handle const &Geometry, gfx::stream
// try to set up the buffer we need
::glGenBuffers( 1, &m_buffer );
bind_buffer();
if( m_buffer == 0 ) { return; } // if we didn't get a buffer we'll try again during the next draw call
// 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
::glBufferData(