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

basic smoke quality settings

This commit is contained in:
tmj-fstate
2019-08-10 22:24:28 +02:00
parent 7ebf6bd7cf
commit 7e91a52646
5 changed files with 41 additions and 15 deletions

View File

@@ -120,6 +120,9 @@ void
opengl_particles::update( opengl_camera const &Camera ) {
m_particlevertices.clear();
if( false == Global.Smoke ) { return; }
// build a list of visible smoke sources
// NOTE: arranged by distance to camera, if we ever need sorting and/or total amount cap-based culling
std::multimap<float, smoke_source const &> sources;
@@ -213,6 +216,7 @@ opengl_particles::update( opengl_camera const &Camera ) {
void
opengl_particles::render( int const Textureunit ) {
if( false == Global.Smoke ) { return; }
if( m_buffercapacity == 0 ) { return; }
if( m_particlevertices.empty() ) { return; }