Commit cd0b6201 by Kai Westerkamp

Merge branch 'master' of ssh://git.breab.org:2223/kai/GraPa

parents 5de04035 656aab6e
......@@ -2,7 +2,12 @@
MainWidget::MainWidget()
{
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setVersion(2, 1);
format.setProfile(QSurfaceFormat::CoreProfile);
setFormat(format);
}
QSize MainWidget::minimumSizeHint() const
......@@ -107,6 +112,7 @@ QOpenGLShaderProgram* MainWidget::initShader(QString fragSource, QString vertSou
void MainWidget::paintGL(){
glViewport(0,0,width(),height());
qDebug()<<"Format"<<this->format().version();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
......
......@@ -4,10 +4,10 @@
#include <QObject>
#include <QtOpenGL>
#include <QOpenGLWidget>
#include <QOpenGLFunctions_3_3_Core>
#include <QOpenGLFunctions_2_1>
#include <QOpenGLShaderProgram>
class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_3_3_Core
class MainWidget : public QOpenGLWidget, public QOpenGLFunctions_2_1
{
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