glClear moved

This commit is contained in:
Jared Bruni
2020-01-23 15:31:37 -08:00
parent ce54722901
commit 7b773f0e8f

View File

@@ -45,6 +45,7 @@ void glDisplayWindow::render() {
if (!m_device)
m_device = new QOpenGLPaintDevice;
if(frame_copy.width()>100 && isVisible()) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
float aspect=(float)width()/(float)height();
@@ -53,8 +54,6 @@ void glDisplayWindow::render() {
glOrtho ( -5.0, 5.0, -5.0/aspect, 5.0/aspect, -5.0, 5.0);
else
glOrtho (-5.0*aspect, 5.0*aspect, -5.0, 5.0, -5.0, 5.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if(frame_copy.width() > 25 && frame_copy.height() > 25) {
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();