Fixed OpenGL 1.1 code with Qt. The Qt version on windows now uses it by default instead of OpenGL 2.0.
This commit is contained in:
+4
-2
@@ -291,18 +291,20 @@ void JGEQtRenderer::resizeGL(int width, int height)
|
|||||||
|
|
||||||
JRenderer::GetInstance()->SetActualWidth(viewPort.right()-viewPort.left());
|
JRenderer::GetInstance()->SetActualWidth(viewPort.right()-viewPort.left());
|
||||||
JRenderer::GetInstance()->SetActualHeight(viewPort.bottom()-viewPort.top());
|
JRenderer::GetInstance()->SetActualHeight(viewPort.bottom()-viewPort.top());
|
||||||
glScissor(0, 0, width, height);
|
glScissor(viewPort.left(), viewPort.top(), viewPort.right()-viewPort.left(), viewPort.bottom()-viewPort.top());
|
||||||
|
|
||||||
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
|
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
|
||||||
|
|
||||||
glMatrixMode (GL_PROJECTION); // Select The Projection Matrix
|
glMatrixMode (GL_PROJECTION); // Select The Projection Matrix
|
||||||
glLoadIdentity (); // Reset The Projection Matrix
|
glLoadIdentity (); // Reset The Projection Matrix
|
||||||
|
|
||||||
gluOrtho2D(0.0f, (float) width-1.0f, 0.0f, (float) height-1.0f);
|
gluOrtho2D(0.0f, (float) (viewPort.right()-viewPort.left())-1.0f, 0.0f, (float) (viewPort.bottom()-viewPort.top())-1.0f);
|
||||||
|
|
||||||
glMatrixMode (GL_MODELVIEW); // Select The Modelview Matrix
|
glMatrixMode (GL_MODELVIEW); // Select The Modelview Matrix
|
||||||
glLoadIdentity (); // Reset The Modelview Matrix
|
glLoadIdentity (); // Reset The Modelview Matrix
|
||||||
|
|
||||||
glDisable (GL_DEPTH_TEST);
|
glDisable (GL_DEPTH_TEST);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ TEMPLATE = app
|
|||||||
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter
|
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter
|
||||||
windows:DEFINES += WIN32
|
windows:DEFINES += WIN32
|
||||||
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
windows:DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||||
windows:DEFINES += FORCE_GL2
|
|
||||||
unix|macx:DEFINES += LINUX
|
unix|macx:DEFINES += LINUX
|
||||||
CONFIG(debug, debug|release):DEFINES += _DEBUG
|
CONFIG(debug, debug|release):DEFINES += _DEBUG
|
||||||
DEFINES += QT_CONFIG
|
DEFINES += QT_CONFIG
|
||||||
|
|||||||
Reference in New Issue
Block a user