Commit c0cb056a authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

fix debuging output

parent a0f83fb9
......@@ -67,6 +67,7 @@ public:
public:
QString title;
bool debug;
public:
QOpenGLContext *context;
......@@ -106,12 +107,14 @@ void dtkVisualizationViewVideoGLPrivate::setVersion(int major, int minor, bool d
this->context->setFormat(format);
this->context->create();
if (this->context->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
if (debug && this->context->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
qDebug() << Q_FUNC_INFO << this->context << this->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << this->context->format();
qDebug() << Q_FUNC_INFO << this->context->surface();
qDebug() << "--------------------------------------------";
}
this->debug = debug;
}
void dtkVisualizationViewVideoGLPrivate::createShaderProgram(void)
......@@ -199,7 +202,7 @@ void dtkVisualizationViewVideoGLPrivate::createTexture(void)
void dtkVisualizationViewVideoGLPrivate::initializeGL(void)
{
if (QOpenGLWidget::context()->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
if (this->debug && QOpenGLWidget::context()->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
qDebug() << Q_FUNC_INFO << 1 << this->context << this->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << 1 << this->context->format();
qDebug() << "--------------------------------------------";
......@@ -234,7 +237,7 @@ void dtkVisualizationViewVideoGLPrivate::initializeGL(void)
createGeometry();
if (QOpenGLWidget::context()->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
if (this->debug && QOpenGLWidget::context()->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
qDebug() << Q_FUNC_INFO << 2 << this->context << this->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << 2 << this->context->format();
qDebug() << "--------------------------------------------";
......@@ -260,7 +263,7 @@ void dtkVisualizationViewVideoGLPrivate::resizeGL(int w, int h)
void dtkVisualizationViewVideoGLPrivate::paintGL(void)
{
if (QOpenGLWidget::context()->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
if (this->debug && QOpenGLWidget::context()->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
qDebug() << Q_FUNC_INFO;
qDebug() << "Current context:" << QOpenGLWidget::context();
qDebug() << "Current context:" << QOpenGLWidget::context()->format();
......@@ -344,7 +347,7 @@ dtkVisualizationViewVideoGL::dtkVisualizationViewVideoGL(QWidget *parent) : dtkW
{
d = new dtkVisualizationViewVideoGLPrivate(this);
d->q = this;
d->setVersion(4, 3, true);
d->setVersion(4, 3, false);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
......@@ -365,7 +368,7 @@ QWidget *dtkVisualizationViewVideoGL::widget(void)
{
QOpenGLContext *context = d->QOpenGLWidget::context();
if (context && context->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
if (context && d->debug && context->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
qDebug() << Q_FUNC_INFO << d->context << d->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << d->format();
qDebug() << "--------------------------------------------";
......
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