add text rendering code

This commit is contained in:
Konstantin Käfer
2014-03-21 17:36:29 +01:00
parent a7b9b96d4d
commit ea6b24d02d
13 changed files with 241 additions and 35 deletions

View File

@@ -0,0 +1,16 @@
#include <llmr/renderer/frame_history.hpp>
using namespace llmr;
// Record frame history that will be used to calculate fading params
void FrameHistory::record(float zoom) {
// first frame ever
if (!history.size()) {
history.emplace_back(FrameSnapshot{0.0f, zoom});
history.emplace_back(FrameSnapshot{0.0f, zoom});
}
if (history.size() == 2 || history.back().z != zoom) {
history.emplace_back(FrameSnapshot{static_cast<float>(platform::time() * 1000), zoom});
}
}