Verified Commit 685fa1e9 authored by Julien Wintz's avatar Julien Wintz

Merge branch 'release/2.4.1'

parents 21919454 522e3c98
# Change Log:
# 2.4.1 10-Dec-2018
- Fix color space when drawing VDO shaders
- Add dependency on dtkLog because of dtkWidgets
## 2.4.0 6-Dec-2018
- cmake fix for windows (link to opengl)
- add ratioBuffer and ratioWidget in ViewVideoGL API
## 2.3.5 18-Oct-2018
- cmake fix for windows
## 2.3.0 17-Oct-2018
- Add a GL video view (GLSL 1.2)
- Add a Raster video view
......
......@@ -23,8 +23,8 @@ project(dtkVisualization)
## ###################################################################
set(${PROJECT_NAME}_VERSION_MAJOR 2)
set(${PROJECT_NAME}_VERSION_MINOR 3)
set(${PROJECT_NAME}_VERSION_PATCH 4)
set(${PROJECT_NAME}_VERSION_MINOR 4)
set(${PROJECT_NAME}_VERSION_PATCH 1)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
......@@ -62,7 +62,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
endif()
## ###################################################################
## Dependencies - cmake
......@@ -76,16 +78,23 @@ include(GenerateExportHeader)
find_package(VTK REQUIRED)
find_package(Qt5 COMPONENTS Core Widgets OpenGL Xml Multimedia MultimediaWidgets REQUIRED)
find_package(Qt5 COMPONENTS Core Widgets OpenGL Xml Multimedia MultimediaWidgets WebSockets REQUIRED)
find_package(dtkFonts 2.0.0 REQUIRED)
find_package(dtkWidgets 2.1.0 REQUIRED)
find_package(dtkLog 2.1.0 REQUIRED)
if(WIN32)
set(OpenGL_GL_PREFERENCE "GLVND")
find_package(OpenGL REQUIRED)
endif(WIN32)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(${VTK_USE_FILE})
include_directories(${dtkLog_INCLUDE_DIRS})
include_directories(${dtkFonts_INCLUDE_DIRS})
include_directories(${dtkWidgets_INCLUDE_DIRS})
......
......@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkLog)
target_link_libraries(${PROJECT_NAME} dtkFonts)
target_link_libraries(${PROJECT_NAME} dtkVisualization)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
......
......@@ -31,11 +31,13 @@ int main(int argc, char **argv)
qputenv("XDG_CURRENT_DESKTOP", "GNOME");
#endif
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
QApplication application(argc, argv);
application.setApplicationName("dtkVisualizationViewer");
application.setOrganizationName("inria");
application.setOrganizationDomain("fr");
application.setApplicationVersion("2.2.2");
application.setApplicationVersion("2.3.5");
dtkVisualizationViewer *viewer = new dtkVisualizationViewer;
viewer->show();
......
......@@ -73,6 +73,10 @@ target_link_libraries(${PROJECT_NAME} dtkVisualizationWidgets)
target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES})
if(WIN32)
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES})
endif(WIN32)
if(APPLE)
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
endif(APPLE)
......
......@@ -17,6 +17,7 @@
#include <dtkWidgets/dtkWidgetsHUD>
#include <dtkWidgets/dtkWidgetsHUDItem>
#include <dtkWidgets/dtkWidgetsOverlayPane>
#include <dtkWidgets/dtkWidgetsOverlayPaneItem>
#include <vtkAbstractArray.h>
#include <vtkAxis.h>
......
......@@ -21,13 +21,16 @@
#include <vtkPlotPoints.h>
#include <vtkSmartPointer.h>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
class vtkAbstractArray;
class vtkRenderer;
class dtkWidgetsHUD;
class dtkWidgetsOverlayPane;
class DTKVISUALIZATION_EXPORT dtkVisualizationPlot2D : public dtkWidgetsWidget
{
Q_OBJECT
......
......@@ -17,11 +17,13 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
class vtkRenderer;
class dtkWidgetsOverlayPane;
class dtkWidgetsHUD;
class DTKVISUALIZATION_EXPORT dtkVisualizationPlot3D : public dtkWidgetsWidget
{
......
......@@ -17,7 +17,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
......@@ -25,6 +25,10 @@ class vtkRenderer;
class vtkRenderWindow;
class vtkRenderWindowInteractor;
class dtkWidgetsHUD;
class dtkWidgetsOverlayPane;
class DTKVISUALIZATION_EXPORT dtkVisualizationView2D : public dtkWidgetsWidget
{
Q_OBJECT
......
......@@ -17,6 +17,7 @@
#include <dtkWidgets/dtkWidgetsHUD>
#include <dtkWidgets/dtkWidgetsHUDItem>
#include <dtkWidgets/dtkWidgetsOverlayPane>
#include <dtkWidgets/dtkWidgetsOverlayPaneItem>
#include <dtkVisualizationWidgets/dtkVisualizationWidgetsActorList>
#include <dtkVisualizationWidgets/dtkVisualizationWidgetsClutEditor>
......
......@@ -17,13 +17,16 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
class vtkRenderer;
class vtkRenderWindowInteractor;
class dtkWidgetsHUD;
class dtkWidgetsOverlayPane;
class DTKVISUALIZATION_EXPORT dtkVisualizationView3D : public dtkWidgetsWidget
{
Q_OBJECT
......
......@@ -17,7 +17,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
class DTKVISUALIZATION_EXPORT dtkVisualizationViewVideo : public dtkWidgetsWidget
......
......@@ -68,8 +68,10 @@ public:
QImage buffer;
public:
qreal rb;
qreal rw;
float rb;
float rw;
float rx;
float ry;
public:
QString title;
......@@ -104,8 +106,8 @@ void dtkVisualizationViewVideoGLPrivate::createGeometry(void)
{
vao.bind();
GLfloat rx = qreal(this->buffer.width())/qreal(this->buffer.height());
GLfloat ry = qreal(this->buffer.width())/qreal(this->buffer.height());
rx = qreal(this->buffer.width())/qreal(this->buffer.height());
ry = qreal(this->buffer.width())/qreal(this->buffer.height());
if(rw < rb)
rx = 1.0;
......@@ -215,7 +217,7 @@ void dtkVisualizationViewVideoGLPrivate::paintGL(void)
this->glBindTexture (GL_TEXTURE_2D, tex);
this->glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
this->glTexImage2D (GL_TEXTURE_2D, 0, 4, this->buffer.width(), this->buffer.height(), 0, GL_BGRA, GL_UNSIGNED_BYTE, this->buffer.bits());
this->glTexImage2D (GL_TEXTURE_2D, 0, 4, this->buffer.width(), this->buffer.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, this->buffer.bits());
this->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
this->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
this->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
......@@ -283,5 +285,15 @@ void dtkVisualizationViewVideoGL::setImage(const QImage& image)
d->resizeGL(d->width(), d->height());
}
float dtkVisualizationViewVideoGL::ratioBuffer(void) const
{
return d->rb;
}
float dtkVisualizationViewVideoGL::ratioWidget(void) const
{
return d->rw;
}
//
// dtkVisualizationViewVideoGL.cpp ends here
......@@ -17,7 +17,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
class DTKVISUALIZATION_EXPORT dtkVisualizationViewVideoGL : public dtkWidgetsWidget
......@@ -38,6 +38,10 @@ public slots:
void setImage(const QImage&);
void setTitle(const QString&);
public:
float ratioBuffer(void) const;
float ratioWidget(void) const;
private:
class dtkVisualizationViewVideoGLPrivate *d;
};
......
......@@ -17,7 +17,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgets>
#include <dtkWidgets/dtkWidgetsWidget>
#include <dtkVisualizationExport>
class DTKVISUALIZATION_EXPORT dtkVisualizationViewVideoRaster : public dtkWidgetsWidget
......
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