Commit 94f11780 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

works on linux

parent 13dce2cb
......@@ -66,11 +66,11 @@ dtkWidgetsWidget *dtkVisualizationViewerStack::create(const QString& type)
dtkVisualizationViewVideoGL *view = new dtkVisualizationViewVideoPlayer(0);
// view->setVersion(4, 1, false);
view->resize(800, 500);
view->show();
view->raise();
// view->resize(800, 500);
// view->show();
// view->raise();
return new dtkWidgetsWidget;
return view;
}
return view;
......
......@@ -195,10 +195,10 @@ void dtkVisualizationViewVideoGLPrivate::initializeGL(void)
view_matrix.setToIdentity();
glEnable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
// glEnable(GL_DEPTH_TEST);
// glEnable(GL_TEXTURE_2D);
glActiveTexture(GL_TEXTURE0);
// glActiveTexture(GL_TEXTURE0);
pgm.setUniformValue("tex", 0);
......@@ -245,7 +245,6 @@ void dtkVisualizationViewVideoGLPrivate::paintGL(void)
logger->initialize(); // initializes in the current context, i.e. ctx
// ///////////////////////////////////////////////////////////////////
this->glGenTextures(1, &tex);
this->glBindTexture (GL_TEXTURE_2D, tex);
this->glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
// #if defined(Q_OS_MAC)
......@@ -260,7 +259,7 @@ void dtkVisualizationViewVideoGLPrivate::paintGL(void)
glClearColor(::bg.redF(), ::bg.greenF(), ::bg.blueF(), 1.f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, tex);
......@@ -302,8 +301,7 @@ dtkVisualizationViewVideoGL::dtkVisualizationViewVideoGL(QWidget *parent) : dtkW
{
d = new dtkVisualizationViewVideoGLPrivate(this);
d->q = this;
d->setVersion(4, 1, false);
this->version = GLSL150;
d->setVersion(4, 1, true);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
......@@ -324,7 +322,7 @@ QWidget *dtkVisualizationViewVideoGL::widget(void)
{
qDebug() << d->context();
qDebug() << d->format();
return d;
}
......
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