|
|
@ -11,7 +11,7 @@ |
|
|
|
#include "FPS.h" |
|
|
|
#include "FPS.h" |
|
|
|
|
|
|
|
|
|
|
|
GLWidget::GLWidget(Simulation * simulation) : simulation(simulation) { |
|
|
|
GLWidget::GLWidget(Simulation * simulation) : simulation(simulation) { |
|
|
|
startTimer(1000 / 60); |
|
|
|
startTimer(1000 / 144); |
|
|
|
overlay = new Overlay(simulation); |
|
|
|
overlay = new Overlay(simulation); |
|
|
|
connect(simulation, &Simulation::layoutChanged, this, &GLWidget::uploadStaticDataToGPU); |
|
|
|
connect(simulation, &Simulation::layoutChanged, this, &GLWidget::uploadStaticDataToGPU); |
|
|
|
connect(simulation, &Simulation::layoutChanged, overlay, &Overlay::fetchEnergyLimit); |
|
|
|
connect(simulation, &Simulation::layoutChanged, overlay, &Overlay::fetchEnergyLimit); |
|
|
@ -44,6 +44,8 @@ void GLWidget::initializeGL() { |
|
|
|
uploadStaticDataToGPU(); |
|
|
|
uploadStaticDataToGPU(); |
|
|
|
|
|
|
|
|
|
|
|
overlay->init(); |
|
|
|
overlay->init(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << format().swapInterval() << std::endl; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void GLWidget::paintGL() { |
|
|
|
void GLWidget::paintGL() { |
|
|
|