diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Samples/Qt/QStoneOpenGlWidget.cpp	Mon Jun 17 15:04:47 2019 +0200
@@ -0,0 +1,31 @@
+#include "../../Framework/OpenGL/OpenGLIncludes.h"
+#include "QStoneOpenGlWidget.h"
+
+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);
+}
+
+void QStoneOpenGlWidget::resizeGL(int w, int h)
+{
+
+}
+
+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();
+  }
+  doneCurrent();
+}
+