Commit 4d0ddd4f authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

Merge branch 'develop' into feature/clut_per_data

parents 6c042da9 206e774f
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## ################################################################### ## ###################################################################
build build
build* build-*
## ################################################################### ## ###################################################################
## Install tree ## Install tree
......
# Version: $Id$ # Version: $Id$
# #
# #
# Commentary: # Commentary:
# #
# #
# Change Log: # Change Log:
# #
# #
# Code: # Code:
...@@ -20,8 +20,7 @@ dependencies: ...@@ -20,8 +20,7 @@ dependencies:
- vtk=8.2.0 - vtk=8.2.0
- dtk-fonts - dtk-fonts
- dtk-log - dtk-log
- dtk-core - dtk-widgets >=2.7.0
- dtk-widgets
# #
# dtk-visualization.yaml ends here # dtk-visualization.yaml ends here
@echo off
mkdir build
cd build
set BUILD_CONFIG=Release
cmake .. -G "Visual Studio 14 2015 Win64" ^
-Wno-dev ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DCMAKE_INSTALL_RPATH:STRING=%LIBRARY_LIB% ^
-DCMAKE_INSTALL_NAME_DIR=%LIBRARY_LIB%
if errorlevel 1 exit 1
cmake --build . --config %BUILD_CONFIG% --target install
if errorlevel 1 exit 1
#!/bin/bash
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib
make -j${CPU_COUNT}
make install
package:
name: dtk-visualization
version: {{ GIT_DESCRIBE_TAG }}
source:
git_url: ../..
build:
number: 0
requirements:
build:
- cmake >=3.2.0
- binutils_impl_linux-64<2.31.0 # [linux]
- {{ compiler('cxx') }}
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libx11-devel') }} # [linux]
- {{ cdt('libXt-devel') }} # [linux]
- {{ cdt('libICE-devel') }} # [linux]
- {{ cdt('libuuid-devel') }} # [linux]
- {{ cdt('libSM-devel') }} # [linux]
- {{ cdt('libxext-devel') }} # [linux]
- {{ cdt('libxcb') }} # [linux]
- {{ cdt('libxrender-devel') }} # [linux]
- {{ cdt('libxau-devel') }} # [linux]
- {{ cdt('libdrm-devel') }} # [linux]
- {{ cdt('libxcomposite-devel') }} # [linux]
- {{ cdt('libxcursor-devel') }} # [linux]
- {{ cdt('libxi-devel') }} # [linux]
- {{ cdt('libxrandr-devel') }} # [linux]
- {{ cdt('pciutils-devel') }} # [linux]
- {{ cdt('libxscrnsaver-devel') }} # [linux]
- {{ cdt('libxtst-devel') }} # [linux]
- {{ cdt('libselinux-devel') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxdamage-devel') }} # [linux]
- {{ cdt('libxfixes') }} # [linux]
- {{ cdt('libxfixes-devel') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
host:
- qt >=5.9.0
- dtk-fonts
- dtk-widgets >=2.7.0,<2.8
- vtk >=8.1.0
run:
- vtk >=8.1.0
- qt >=5.9.0
- dtk-fonts
- dtk-widgets >=2.7.0,<2.8
- dtk-widgets >=2.7.0,<2.8
- gst-plugins-good # [linux]
- gst-libav # [linux]
about:
home: http://dtk.inria.fr/
license: BSD
summary: dtk-visualization is a bridge between Qt and VTK and requires no additional dependency.
...@@ -67,6 +67,7 @@ public: ...@@ -67,6 +67,7 @@ public:
public: public:
QString title; QString title;
bool debug;
public: public:
QOpenGLContext *context; QOpenGLContext *context;
...@@ -106,12 +107,14 @@ void dtkVisualizationViewVideoGLPrivate::setVersion(int major, int minor, bool d ...@@ -106,12 +107,14 @@ void dtkVisualizationViewVideoGLPrivate::setVersion(int major, int minor, bool d
this->context->setFormat(format); this->context->setFormat(format);
this->context->create(); 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 << this->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << this->context->format(); qDebug() << Q_FUNC_INFO << this->context->format();
qDebug() << Q_FUNC_INFO << this->context->surface(); qDebug() << Q_FUNC_INFO << this->context->surface();
qDebug() << "--------------------------------------------"; qDebug() << "--------------------------------------------";
} }
this->debug = debug;
} }
void dtkVisualizationViewVideoGLPrivate::createShaderProgram(void) void dtkVisualizationViewVideoGLPrivate::createShaderProgram(void)
...@@ -199,7 +202,7 @@ void dtkVisualizationViewVideoGLPrivate::createTexture(void) ...@@ -199,7 +202,7 @@ void dtkVisualizationViewVideoGLPrivate::createTexture(void)
void dtkVisualizationViewVideoGLPrivate::initializeGL(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 << this->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << 1 << this->context->format(); qDebug() << Q_FUNC_INFO << 1 << this->context->format();
qDebug() << "--------------------------------------------"; qDebug() << "--------------------------------------------";
...@@ -234,7 +237,7 @@ void dtkVisualizationViewVideoGLPrivate::initializeGL(void) ...@@ -234,7 +237,7 @@ void dtkVisualizationViewVideoGLPrivate::initializeGL(void)
createGeometry(); 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 << this->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << 2 << this->context->format(); qDebug() << Q_FUNC_INFO << 2 << this->context->format();
qDebug() << "--------------------------------------------"; qDebug() << "--------------------------------------------";
...@@ -260,7 +263,7 @@ void dtkVisualizationViewVideoGLPrivate::resizeGL(int w, int h) ...@@ -260,7 +263,7 @@ void dtkVisualizationViewVideoGLPrivate::resizeGL(int w, int h)
void dtkVisualizationViewVideoGLPrivate::paintGL(void) 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() << Q_FUNC_INFO;
qDebug() << "Current context:" << QOpenGLWidget::context(); qDebug() << "Current context:" << QOpenGLWidget::context();
qDebug() << "Current context:" << QOpenGLWidget::context()->format(); qDebug() << "Current context:" << QOpenGLWidget::context()->format();
...@@ -365,7 +368,7 @@ QWidget *dtkVisualizationViewVideoGL::widget(void) ...@@ -365,7 +368,7 @@ QWidget *dtkVisualizationViewVideoGL::widget(void)
{ {
QOpenGLContext *context = d->QOpenGLWidget::context(); 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->context << d->context->shareContext() << QOpenGLContext::globalShareContext();
qDebug() << Q_FUNC_INFO << d->format(); qDebug() << Q_FUNC_INFO << d->format();
qDebug() << "--------------------------------------------"; qDebug() << "--------------------------------------------";
......
...@@ -918,10 +918,9 @@ void dtkVisualizationWidgetsClutEditor::setColorTransferFunction(vtkColorTransfe ...@@ -918,10 +918,9 @@ void dtkVisualizationWidgetsClutEditor::setColorTransferFunction(vtkColorTransfe
d->colorTransferFunction->DeepCopy(color_transfer_function); d->colorTransferFunction->DeepCopy(color_transfer_function);
if(!d->opacityTransferFunction)
return;
this->updateTable(); this->updateTable();
this->onApply();
} }
void *dtkVisualizationWidgetsClutEditor::opacityTransferFunction(void) void *dtkVisualizationWidgetsClutEditor::opacityTransferFunction(void)
...@@ -931,9 +930,13 @@ void *dtkVisualizationWidgetsClutEditor::opacityTransferFunction(void) ...@@ -931,9 +930,13 @@ void *dtkVisualizationWidgetsClutEditor::opacityTransferFunction(void)
void dtkVisualizationWidgetsClutEditor::setOpacityTransferFunction(vtkPiecewiseFunction *opacity_transfer_function) void dtkVisualizationWidgetsClutEditor::setOpacityTransferFunction(vtkPiecewiseFunction *opacity_transfer_function)
{ {
d->opacityTransferFunction = opacity_transfer_function; if(!d->opacityTransferFunction) d->opacityTransferFunction = vtkPiecewiseFunction::New();
d->opacityTransferFunction->DeepCopy(opacity_transfer_function);
this->updateTable(); this->updateTable();
this->onApply();
} }
void dtkVisualizationWidgetsClutEditor::updateTable(void) void dtkVisualizationWidgetsClutEditor::updateTable(void)
......
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