|
|
|
@ -45,9 +45,9 @@ void GLWidget::initializeGL() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GLWidget::paintGL() { |
|
|
|
|
//auto p = new QPainter(this);
|
|
|
|
|
//p->setRenderHint(QPainter::Antialiasing);
|
|
|
|
|
//p->beginNativePainting();
|
|
|
|
|
auto p = new QPainter(this); |
|
|
|
|
p->setRenderHint(QPainter::Antialiasing); |
|
|
|
|
p->beginNativePainting(); |
|
|
|
|
|
|
|
|
|
// Native OpenGL
|
|
|
|
|
{ |
|
|
|
@ -75,9 +75,8 @@ void GLWidget::paintGL() { |
|
|
|
|
|
|
|
|
|
glBindVertexArray(0); |
|
|
|
|
} |
|
|
|
|
//p->endNativePainting();
|
|
|
|
|
p->endNativePainting(); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
// FPS
|
|
|
|
|
{ |
|
|
|
|
p->setPen(Qt::white); |
|
|
|
@ -88,9 +87,7 @@ void GLWidget::paintGL() { |
|
|
|
|
QString fpsString = "FPS: " + QString::fromStdString(std::to_string(fps->current)); |
|
|
|
|
p->drawText(0, 0, 100, 100, Qt::AlignTop | Qt::AlignLeft, fpsString); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
//p->end();
|
|
|
|
|
p->end(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GLWidget::timerEvent(QTimerEvent *e) { |
|
|
|
|