Mercurial > hg > orthanc-stone
comparison Samples/Qt/QStoneOpenGlWidget.cpp @ 849:8a8cf2991538 am-dev
Qt sample (work in progress)
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 17 Jun 2019 15:04:47 +0200 |
parents | |
children | 23701fbf228e |
comparison
equal
deleted
inserted
replaced
838:997290c7d537 | 849:8a8cf2991538 |
---|---|
1 #include "../../Framework/OpenGL/OpenGLIncludes.h" | |
2 #include "QStoneOpenGlWidget.h" | |
3 | |
4 void QStoneOpenGlWidget::initializeGL() | |
5 { | |
6 // Set up the rendering context, load shaders and other resources, etc.: | |
7 QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); | |
8 f->glClearColor(1.0f, 1.0f, 1.0f, 1.0f); | |
9 } | |
10 | |
11 void QStoneOpenGlWidget::resizeGL(int w, int h) | |
12 { | |
13 | |
14 } | |
15 | |
16 void QStoneOpenGlWidget::paintGL() | |
17 { | |
18 makeCurrent(); | |
19 | |
20 // // Draw the scene: | |
21 // QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); | |
22 // f->glClear(GL_COLOR_BUFFER_BIT); | |
23 // f->glClearColor(1.0f, 0.3f, 0.5f, 1.0f); | |
24 | |
25 if (compositor_) | |
26 { | |
27 compositor_->Refresh(); | |
28 } | |
29 doneCurrent(); | |
30 } | |
31 |