Commit 5d3de742 by Kai Westerkamp

Laptop Läuft

parent cd0b6201
......@@ -2,12 +2,7 @@
MainWidget::MainWidget()
{
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setVersion(2, 1);
format.setProfile(QSurfaceFormat::CoreProfile);
setFormat(format);
}
QSize MainWidget::minimumSizeHint() const
......@@ -27,6 +22,8 @@ void MainWidget::initializeGL(){
if(!glFunctionsOK)
exit(4);
qDebug()<<"Version"<<this->format().version();
glClearColor(0.0, 0.0, 0.0, 0.0);
glEnable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
......
......@@ -4,10 +4,10 @@
#include <QObject>
#include <QtOpenGL>
#include <QOpenGLWidget>
#include <QOpenGLFunctions_2_1>
#include <QOpenGLFunctions_3_3_Core>
#include <QOpenGLShaderProgram>
class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_2_1
class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_3_3_Core
{
Q_OBJECT
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment