diff options
author | Chris Xiong <chirs241097@gmail.com> | 2018-02-03 01:00:00 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2018-02-03 01:00:00 +0800 |
commit | 6f222c24e3f3d53657afce3d252a6d3bce5f269a (patch) | |
tree | f48524968b44a5c9ae3e76372e2bc0d32800f691 | |
parent | d1e39d9b0a790f839c7a6cc72e4fe10d230c1921 (diff) | |
download | QMidiPlayer-6f222c24e3f3d53657afce3d252a6d3bce5f269a.tar.xz |
Minor performance improvement to the 3D visualization.
-rw-r--r-- | visualization/qmpvisualization.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 62534bd..b4a9b7f 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -410,6 +410,8 @@ void qmpVisualization::updateVisualization3D() p3d[i]->setKeyTravelDist(j,traveld[i][j]/10.); } p3d[i]->render(smvec3d(0.756*api->getPitchBend(i),stairpiano?55-i*7:62-i*8,stairpiano*i*2)); + } + for(int i=0;i<16;++i) if(showlabel) { std::string s=api->getChannelPresetString(i); @@ -418,7 +420,6 @@ void qmpVisualization::updateVisualization3D() fonthdpi.render(-49,stairpiano?56-i*7:63-i*8,stairpiano*i*2+0.1,0xFFFFFFFF,ALIGN_RIGHT,.008,0.01); fonthdpi.render(-49.05,stairpiano?56.05-i*7:63.05-i*8,stairpiano*i*2+0.2,0xFF000000,ALIGN_RIGHT,.008,0.01); } - } if(playing)ctk+=(int)1e6/((double)api->getRawTempo()/api->getDivision())*sm->smGetDelta(); while(pool.size()&&elb<pool.size()&&((double)ctk-pool[elb]->tce)*lpt>viewdist*2)++elb; sm->smRenderEnd(); |