Mercurial > hg > orthanc-stone
diff Samples/Qt/QStoneOpenGlWidget.cpp @ 863:23701fbf228e am-dev
first rendering of a 2DScene in Qt widget
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 24 Jun 2019 16:29:49 +0200 |
parents | 8a8cf2991538 |
children | 12b591d5d63c |
line wrap: on
line diff
--- a/Samples/Qt/QStoneOpenGlWidget.cpp Mon Jun 24 14:35:00 2019 +0200 +++ b/Samples/Qt/QStoneOpenGlWidget.cpp Mon Jun 24 16:29:49 2019 +0200 @@ -3,9 +3,12 @@ void QStoneOpenGlWidget::initializeGL() { - // Set up the rendering context, load shaders and other resources, etc.: - QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); - f->glClearColor(1.0f, 1.0f, 1.0f, 1.0f); + glewInit(); +} + +void QStoneOpenGlWidget::MakeCurrent() +{ + this->makeCurrent(); } void QStoneOpenGlWidget::resizeGL(int w, int h) @@ -15,13 +18,6 @@ void QStoneOpenGlWidget::paintGL() { - makeCurrent(); - - // // Draw the scene: - // QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); - // f->glClear(GL_COLOR_BUFFER_BIT); - // f->glClearColor(1.0f, 0.3f, 0.5f, 1.0f); - if (compositor_) { compositor_->Refresh();