Skip to content

Commit

Permalink
More viewport debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
10110111 committed Jan 25, 2025
1 parent 0ec7154 commit dd5d97f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/StelMainView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,18 @@ class StelRootItem : public QGraphicsObject
//a sanity check
Q_ASSERT(mainView->glContext() == QOpenGLContext::currentContext());

{
static int oldViewportWidth, oldViewportHeight;
GLint viewport[4] = {};
GL(QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_VIEWPORT, viewport));
if(viewport[2] != oldViewportWidth || viewport[3] != oldViewportHeight)
{
qDebug() << "Early painting: OpenGL viewport size: " << viewport[2] << "x" << viewport[3];
oldViewportWidth = viewport[2];
oldViewportHeight = viewport[3];
}
}

const double now = StelApp::getTotalRunTime();
double dt = now - previousPaintTime;
//qDebug()<<"dt"<<dt;
Expand Down

0 comments on commit dd5d97f

Please sign in to comment.