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

refactoring: skydome visualization code extraction

This commit is contained in:
tmj-fstate
2019-10-23 16:45:56 +02:00
parent ae40f5486f
commit bc8b3d72f3
11 changed files with 181 additions and 69 deletions

View File

@@ -125,6 +125,7 @@ opengl_particles::update( opengl_camera const &Camera ) {
}
// ...and cleanup
::glPopClientAttrib();
::glBindBuffer( GL_ARRAY_BUFFER, 0 );
}
std::size_t
@@ -148,11 +149,8 @@ opengl_particles::render( int const Textureunit ) {
// ...draw...
::glDrawArrays( GL_QUADS, 0, m_particlevertices.size() );
// ...and cleanup
::glBindBuffer( GL_ARRAY_BUFFER, 0 );
if( Global.bUseVBO ) {
gfx::opengl_vbogeometrybank::reset();
}
::glPopClientAttrib();
::glBindBuffer( GL_ARRAY_BUFFER, 0 );
return m_particlevertices.size() / 4;
}