Commit 5d3de742 by Kai Westerkamp

Laptop Läuft

parent cd0b6201
...@@ -2,12 +2,7 @@ ...@@ -2,12 +2,7 @@
MainWidget::MainWidget() MainWidget::MainWidget()
{ {
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setVersion(2, 1);
format.setProfile(QSurfaceFormat::CoreProfile);
setFormat(format);
} }
QSize MainWidget::minimumSizeHint() const QSize MainWidget::minimumSizeHint() const
...@@ -27,6 +22,8 @@ void MainWidget::initializeGL(){ ...@@ -27,6 +22,8 @@ void MainWidget::initializeGL(){
if(!glFunctionsOK) if(!glFunctionsOK)
exit(4); exit(4);
qDebug()<<"Version"<<this->format().version();
glClearColor(0.0, 0.0, 0.0, 0.0); glClearColor(0.0, 0.0, 0.0, 0.0);
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
#include <QObject> #include <QObject>
#include <QtOpenGL> #include <QtOpenGL>
#include <QOpenGLWidget> #include <QOpenGLWidget>
#include <QOpenGLFunctions_2_1> #include <QOpenGLFunctions_3_3_Core>
#include <QOpenGLShaderProgram> #include <QOpenGLShaderProgram>
class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_2_1 class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_3_3_Core
{ {
Q_OBJECT Q_OBJECT
public: 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