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

opengl 3.3 renderer cascaded shadow maps, minor gfx renderer optimizations

This commit is contained in:
tmj-fstate
2019-12-05 15:42:54 +01:00
parent 194400e1af
commit 63619d13a6
21 changed files with 416 additions and 443 deletions

View File

@@ -99,14 +99,12 @@ opengl33_particles::update( opengl_camera const &Camera ) {
}
}
void
std::size_t
opengl33_particles::render() {
if (!Global.Smoke)
return;
if( m_buffercapacity == 0 ) { return; }
if( m_particlevertices.empty() ) { return; }
if( false == Global.Smoke ) { return 0; }
if( m_buffercapacity == 0 ) { return 0; }
if( m_particlevertices.empty() ) { return 0; }
if (!m_vao) {
m_vao.emplace();
@@ -135,6 +133,8 @@ opengl33_particles::render() {
m_shader->unbind();
m_vao->unbind();
m_buffer->unbind(gl::buffer::ARRAY_BUFFER);
return m_particlevertices.size() / 6;
}
//---------------------------------------------------------------------------