view Samples/Qt/QStoneOpenGlWidget.cpp @ 860:238693c3bc51 am-dev

merge default -> am-dev
author Alain Mazy <alain@mazy.be>
date Mon, 24 Jun 2019 14:35:00 +0200
parents 8a8cf2991538
children 23701fbf228e
line wrap: on
line source

#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();
}