Пример #1
0
void GUI::handleUpdate() {
    const int interval = _timer->interval(); // in ms
    _updateCallback(interval / 1000.f); // in s

    // Update the data of the renderer after the update callback has returned
    _renderer->updateData();
    // Update the label showing the amount of particles
    _numParticlesLabel->setText(QString("Number of Particles:\n%1").arg(_renderer->numberOfParticles()));
    // Trigger a new rendering
    _renderer->updateGL();
}
Пример #2
0
 void State::update(float delta)
 {
     if (!_updateCallback)
         _updateCallback(delta);
 }