mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-06 06:50:02 +01:00
glClear moved
This commit is contained in:
@@ -45,6 +45,7 @@ void glDisplayWindow::render() {
|
|||||||
if (!m_device)
|
if (!m_device)
|
||||||
m_device = new QOpenGLPaintDevice;
|
m_device = new QOpenGLPaintDevice;
|
||||||
if(frame_copy.width()>100 && isVisible()) {
|
if(frame_copy.width()>100 && isVisible()) {
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
float aspect=(float)width()/(float)height();
|
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);
|
glOrtho ( -5.0, 5.0, -5.0/aspect, 5.0/aspect, -5.0, 5.0);
|
||||||
else
|
else
|
||||||
glOrtho (-5.0*aspect, 5.0*aspect, -5.0, 5.0, -5.0, 5.0);
|
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) {
|
if(frame_copy.width() > 25 && frame_copy.height() > 25) {
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|||||||
Reference in New Issue
Block a user