Commit e7e55015 authored by Jakob Weiss's avatar Jakob Weiss

First steps replacing QGLWidget with QOpenGLWidget - currently crashes and burns horribly

parent 17f5574c
...@@ -171,4 +171,9 @@ float getPhongShadingIntensity(in vec3 position, in LightSource light, in vec3 c ...@@ -171,4 +171,9 @@ float getPhongShadingIntensity(in vec3 position, in LightSource light, in vec3 c
toReturn *= computeAttenuation(light._attenuation, d); toReturn *= computeAttenuation(light._attenuation, d);
#endif #endif
return (toReturn.x + toReturn.y + toReturn.z) / 3.0; return (toReturn.x + toReturn.y + toReturn.z) / 3.0;
} }
\ No newline at end of file
vec3 calculateContourShading(in vec3 position, in vec3 camera, in vec3 normal, in vec3 materialColor, in vec3 outlineColor, in float contourExponent) {
float outlineStrength = 1. - pow(clamp(-dot(normalize(normal), normalize(position - camera)), 0, 1), contourExponent);
return mix(materialColor, outlineColor, outlineStrength);
}
...@@ -99,7 +99,7 @@ namespace campvis { ...@@ -99,7 +99,7 @@ namespace campvis {
CAMPVIS_CORE_API void startOpenGlThreadAndMoveQtThreadAffinity(cgt::Runnable* runnable, cgt::GLCanvas* canvas) { CAMPVIS_CORE_API void startOpenGlThreadAndMoveQtThreadAffinity(cgt::Runnable* runnable, cgt::GLCanvas* canvas) {
// welcome to a complex signalling ping-pong to move the OpenGL context thread affinity // welcome to a complex signalling ping-pong to move the OpenGL context thread affinity
// we will use targetThread as signalling variable and initialize it with nullptr: // we will use targetThread as signalling variable and initialize it with nullptr:
void* targetThread = nullptr; volatile void* targetThread = nullptr;
// start the new thread with special init function // start the new thread with special init function
runnable->start([&]() { runnable->start([&]() {
...@@ -120,7 +120,7 @@ namespace campvis { ...@@ -120,7 +120,7 @@ namespace campvis {
std::this_thread::yield(); std::this_thread::yield();
// set the QGLContext's thread affinity // set the QGLContext's thread affinity
canvas->moveThreadAffinity(targetThread); canvas->moveThreadAffinity(const_cast<void*>(targetThread));
// reset the signal variable so that the new thread can continue. // reset the signal variable so that the new thread can continue.
targetThread = nullptr; targetThread = nullptr;
......
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
namespace campvis { namespace campvis {
const std::string AbstractPipeline::loggerCat_ = "CAMPVis.core.datastructures.AbstractPipeline"; const std::string AbstractPipeline::loggerCat_ = "CAMPVis.core.datastructures.AbstractPipeline";
void AbstractPipeline::debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * message, const void * userParam)
{
std::cerr << "**** GL Debug Message Error: " << type << " " << id << " " << severity << " " << std::endl << message << std::endl;
}
AbstractPipeline::AbstractPipeline(DataContainer& dc) AbstractPipeline::AbstractPipeline(DataContainer& dc)
: HasPropertyCollection() : HasPropertyCollection()
, cgt::EventHandler() , cgt::EventHandler()
...@@ -74,6 +80,11 @@ namespace campvis { ...@@ -74,6 +80,11 @@ namespace campvis {
_painter->init(); _painter->init();
initAllProperties(); initAllProperties();
glDebugMessageCallback(&debugMessageCallback, this);
LGL_ERROR;
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, true);
LGL_ERROR;
// initialize all processors: // initialize all processors:
for (std::vector<AbstractProcessor*>::iterator it = _processors.begin(); it != _processors.end(); ++it) { for (std::vector<AbstractProcessor*>::iterator it = _processors.begin(); it != _processors.end(); ++it) {
try { try {
......
...@@ -230,6 +230,10 @@ namespace campvis { ...@@ -230,6 +230,10 @@ namespace campvis {
sigslot::signal0 s_deinit; sigslot::signal0 s_deinit;
protected: protected:
/// debug message callback registered to glDebugMessageCallback to catch OpenGL Errors
static void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam);
/** /**
* Forces the execution of the given processor regardless of its invalidation or enabled state. * Forces the execution of the given processor regardless of its invalidation or enabled state.
* \param processor Processor to execute. * \param processor Processor to execute.
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
**********************************************************************/ **********************************************************************/
#include "cgt/init.h" #include "cgt/init.h"
#include "cgt/cgt_gl.h"
#include "cgt/assert.h" #include "cgt/assert.h"
#include "cgt/glcanvas.h" #include "cgt/glcanvas.h"
...@@ -102,11 +101,20 @@ void initGL(GLCanvas* backgroundGlContext, InitFeature::Features featureset) { ...@@ -102,11 +101,20 @@ void initGL(GLCanvas* backgroundGlContext, InitFeature::Features featureset) {
TextureManager::init(); TextureManager::init();
if (featureset & InitFeature::GPU_PROPERTIES ) if (featureset & InitFeature::GPU_PROPERTIES) {
GpuCapabilities::init(); GpuCapabilities::init();
#ifdef _MSC_VER #ifdef _MSC_VER
GpuCapabilitiesWindows::init(); GpuCapabilitiesWindows::init();
#endif #endif
}
// setup debug callback
if (featureset & InitFeature::GL_DEBUG_CALLBACK) {
glDebugMessageCallback(&debugMessageCallback, nullptr);
LGL_ERROR;
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, true);
LGL_ERROR;
}
// starting shadermanager // starting shadermanager
ShaderManager::init(); ShaderManager::init();
...@@ -132,4 +140,11 @@ void deinitGL() { ...@@ -132,4 +140,11 @@ void deinitGL() {
} }
void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * message, const void * userParam)
{
std::cerr << "**** GL Debug Message Error: " << type << " " << id << " " << severity << " " << std::endl << message << std::endl;
}
} // namespace } // namespace
...@@ -32,25 +32,28 @@ ...@@ -32,25 +32,28 @@
#include "cgt/types.h" #include "cgt/types.h"
#include "cgt/logmanager.h" #include "cgt/logmanager.h"
#include "cgt/cgt_gl.h"
namespace cgt { namespace cgt {
class GLCanvas; class GLCanvas;
class CGT_API InitFeature { class CGT_API InitFeature {
public: public:
enum Features { enum Features {
NONE = 0, NONE = 0,
LOG_MANAGER = 1 << 0, LOG_MANAGER = 1 << 0,
FILE_SYSTEM = 1 << 1, FILE_SYSTEM = 1 << 1,
GPU_PROPERTIES = 1 << 2, GPU_PROPERTIES = 1 << 2,
SCRIPT_MANAGER = 1 << 3, SCRIPT_MANAGER = 1 << 3,
SHADER_MANAGER = 1 << 4, SHADER_MANAGER = 1 << 4,
TEXTURE_MANAGER = 1 << 6, TEXTURE_MANAGER = 1 << 6,
TESSELATOR = 1 << 7, TESSELATOR = 1 << 7,
LOG_TO_CONSOLE = 1 << 30, GL_DEBUG_CALLBACK = 1 << 8,
ALL = ( LOG_TO_CONSOLE = 1 << 30,
ALL = (
LOG_MANAGER | FILE_SYSTEM | GPU_PROPERTIES | LOG_MANAGER | FILE_SYSTEM | GPU_PROPERTIES |
SCRIPT_MANAGER | SHADER_MANAGER | SCRIPT_MANAGER | SHADER_MANAGER |
TEXTURE_MANAGER | TESSELATOR | TEXTURE_MANAGER | TESSELATOR | GL_DEBUG_CALLBACK |
LOG_TO_CONSOLE LOG_TO_CONSOLE
) )
}; };
...@@ -66,7 +69,11 @@ CGT_API void initGL(GLCanvas* backgroundGlContext, InitFeature::Features feature ...@@ -66,7 +69,11 @@ CGT_API void initGL(GLCanvas* backgroundGlContext, InitFeature::Features feature
CGT_API void deinit(); CGT_API void deinit();
/// deinit the singletons of cgt /// deinit the singletons of cgt
CGT_API void deinitGL(); CGT_API void deinitGL();
/// debug message callback registered to glDebugMessageCallback to catch OpenGL Errors
void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam);
}; };
#endif //CGT_INIT_H #endif //CGT_INIT_H
...@@ -29,17 +29,18 @@ ...@@ -29,17 +29,18 @@
#include "qtcanvas.h" #include "qtcanvas.h"
#include <QThread> #include <QThread>
#include <QOpenGLContext>
namespace cgt { namespace cgt {
// shared context widget // shared context widget
QGLWidget* QtCanvas::shareWidget_ = 0; QOpenGLWidget* QtCanvas::shareWidget_ = 0;
QtCanvas::QtCanvas(const std::string& title, QtCanvas::QtCanvas(const std::string& title,
const ivec2& size, const ivec2& size,
const Buffers buffers, const Buffers buffers,
QWidget* parent, bool shared, Qt::WindowFlags f, char* /*name*/) QWidget* parent, bool shared, Qt::WindowFlags f, char* /*name*/)
: QGLWidget(getQGLFormat(buffers), 0, (shared ? shareWidget_ : 0), f) : QOpenGLWidget(parent, f)
, GLCanvas(title, size, buffers) , GLCanvas(title, size, buffers)
{ {
resize(size.x, size.y); resize(size.x, size.y);
...@@ -52,7 +53,7 @@ QtCanvas::QtCanvas(const std::string& title, ...@@ -52,7 +53,7 @@ QtCanvas::QtCanvas(const std::string& title,
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// we have our own AutoBufferSwap-mechanism (GLCanvas::setAutoFlush), so disable the one of qt // we have our own AutoBufferSwap-mechanism (GLCanvas::setAutoFlush), so disable the one of qt
setAutoBufferSwap(false); //setAutoBufferSwap(false); // TODO jw: not sure what this does, figure out later
rgbaSize_ = ivec4(format().redBufferSize(), rgbaSize_ = ivec4(format().redBufferSize(),
format().greenBufferSize(), format().greenBufferSize(),
...@@ -60,7 +61,7 @@ QtCanvas::QtCanvas(const std::string& title, ...@@ -60,7 +61,7 @@ QtCanvas::QtCanvas(const std::string& title,
format().alphaBufferSize()); format().alphaBufferSize());
stencilSize_ = format().stencilBufferSize(); stencilSize_ = format().stencilBufferSize();
depthSize_ = format().depthBufferSize(); depthSize_ = format().depthBufferSize();
doubleBuffered_ = doubleBuffer(); doubleBuffered_ = format().swapBehavior() == QSurfaceFormat::DoubleBuffer;
stereoViewing_ = format().stereo(); stereoViewing_ = format().stereo();
connect(this, &QtCanvas::s_sizeChangedExternally, this, &QtCanvas::sizeChangedExternally); connect(this, &QtCanvas::s_sizeChangedExternally, this, &QtCanvas::sizeChangedExternally);
...@@ -68,13 +69,13 @@ QtCanvas::QtCanvas(const std::string& title, ...@@ -68,13 +69,13 @@ QtCanvas::QtCanvas(const std::string& title,
} }
QtCanvas::QtCanvas(QWidget* parent, bool shared, Qt::WindowFlags f, char* /*name*/) QtCanvas::QtCanvas(QWidget* parent, bool shared, Qt::WindowFlags f, char* /*name*/)
: QGLWidget(getQGLFormat(), 0, (shared ? shareWidget_ : 0), f) : QOpenGLWidget(parent, f)
{ {
if (shared && shareWidget_ == 0) if (shared && shareWidget_ == 0)
shareWidget_ = this; shareWidget_ = this;
// we have our own AutoBufferSwap-mechanism (GLCanvas::setAutoFlush), so disable the one of qt // we have our own AutoBufferSwap-mechanism (GLCanvas::setAutoFlush), so disable the one of qt
setAutoBufferSwap(false); //setAutoBufferSwap(false);
rgbaSize_ = ivec4(format().redBufferSize(), rgbaSize_ = ivec4(format().redBufferSize(),
format().greenBufferSize(), format().greenBufferSize(),
...@@ -82,7 +83,7 @@ QtCanvas::QtCanvas(QWidget* parent, bool shared, Qt::WindowFlags f, char* /*name ...@@ -82,7 +83,7 @@ QtCanvas::QtCanvas(QWidget* parent, bool shared, Qt::WindowFlags f, char* /*name
format().alphaBufferSize()); format().alphaBufferSize());
stencilSize_ = format().stencilBufferSize(); stencilSize_ = format().stencilBufferSize();
depthSize_ = format().depthBufferSize(); depthSize_ = format().depthBufferSize();
doubleBuffered_ = doubleBuffer(); doubleBuffered_ = format().swapBehavior() == QSurfaceFormat::DoubleBuffer;
stereoViewing_ = format().stereo(); stereoViewing_ = format().stereo();
} }
...@@ -90,7 +91,7 @@ QtCanvas::~QtCanvas() {} ...@@ -90,7 +91,7 @@ QtCanvas::~QtCanvas() {}
void QtCanvas::moveThreadAffinity(void* threadPointer) { void QtCanvas::moveThreadAffinity(void* threadPointer) {
QThread* qThreadPointer = static_cast<QThread*>(threadPointer); QThread* qThreadPointer = static_cast<QThread*>(threadPointer);
this->context()->moveToThread(qThreadPointer); context()->moveToThread(qThreadPointer);
} }
void* QtCanvas::getCurrentThreadPointer() { void* QtCanvas::getCurrentThreadPointer() {
...@@ -109,16 +110,17 @@ void QtCanvas::paintGL() { ...@@ -109,16 +110,17 @@ void QtCanvas::paintGL() {
} }
void QtCanvas::repaint() { void QtCanvas::repaint() {
updateGL(); QOpenGLWidget::update();
} }
void QtCanvas::update() { void QtCanvas::update() {
QWidget::update(); QOpenGLWidget::update();
} }
void QtCanvas::swap() { void QtCanvas::swap() {
QGLWidget::swapBuffers(); //context()->swapBuffers();
QGLWidget::makeCurrent(); //QOpenGLWidget::makeCurrent();
update();
} }
void QtCanvas::toggleFullScreen() { void QtCanvas::toggleFullScreen() {
...@@ -255,25 +257,37 @@ cgt::Event::Modifier QtCanvas::getModifier(QInputEvent* e) { ...@@ -255,25 +257,37 @@ cgt::Event::Modifier QtCanvas::getModifier(QInputEvent* e) {
return cgt::Event::Modifier(result); return cgt::Event::Modifier(result);
} }
QGLFormat QtCanvas::getQGLFormat(const Buffers buffers) { QSurfaceFormat QtCanvas::getQGLSurfaceFormat(const Buffers buffers) {
QGLFormat format = getQGLFormat(); QSurfaceFormat format = getQGLSurfaceFormat();
format.setAlpha(buffers & GLCanvas::ALPHA_BUFFER); if (buffers & GLCanvas::ALPHA_BUFFER) format.setAlphaBufferSize(8);
format.setDepth(buffers & GLCanvas::DEPTH_BUFFER); if (buffers & GLCanvas::DEPTH_BUFFER) format.setDepthBufferSize(24);
format.setDoubleBuffer(buffers & GLCanvas::DOUBLE_BUFFER); if (buffers & GLCanvas::DOUBLE_BUFFER) format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
format.setStencil(buffers & GLCanvas::STENCIL_BUFFER);
format.setAccum(buffers & GLCanvas::ACCUM_BUFFER); if (buffers & GLCanvas::STENCIL_BUFFER) format.setStencilBufferSize(8);
format.setStereo(buffers & GLCanvas::STEREO_VIEWING); if (buffers & GLCanvas::ACCUM_BUFFER) {// TODO QSurfaceFormat does not support htis anymore?
format.setSampleBuffers(buffers & GLCanvas::MULTISAMPLING); throw std::logic_error("Accumulation buffer not implemented directly on the surface.");
}
if (buffers & GLCanvas::STEREO_VIEWING) {
format.setOption(QSurfaceFormat::StereoBuffers);
}
if (buffers & GLCanvas::MULTISAMPLING) {
format.setSamples(2);
}
return format; return format;
} }
QGLFormat QtCanvas::getQGLFormat() QSurfaceFormat QtCanvas::getQGLSurfaceFormat()
{ {
QGLFormat format = QGLFormat(QGL::NoDeprecatedFunctions); QSurfaceFormat format;
format = QGLFormat(QGL::NoDeprecatedFunctions); format.setVersion(4, 3);
format.setProfile(QGLFormat::CoreProfile); format.setProfile(QSurfaceFormat::CoreProfile);
//format.setVersion(3, 3); format.setOption(QSurfaceFormat::DebugContext);
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
//QSurfaceFormat::setDefaultFormat(format);
return format; return format;
} }
...@@ -607,11 +621,11 @@ QSize QtCanvas::sizeHint() const { ...@@ -607,11 +621,11 @@ QSize QtCanvas::sizeHint() const {
} }
void QtCanvas::acquireAsCurrentContext() { void QtCanvas::acquireAsCurrentContext() {
QGLWidget::makeCurrent(); QOpenGLWidget::makeCurrent();
} }
void QtCanvas::releaseAsCurrentContext() { void QtCanvas::releaseAsCurrentContext() {
QGLWidget::doneCurrent(); QOpenGLWidget::doneCurrent();
} }
void QtCanvas::sizeChangedExternally(int w, int h) { void QtCanvas::sizeChangedExternally(int w, int h) {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "cgt/glcanvas.h" #include "cgt/glcanvas.h"
#include "cgt/types.h" #include "cgt/types.h"
#include <QGLWidget> #include <QOpenGLWidget>
#include <QGLFormat> #include <QGLFormat>
#include <QMouseEvent> #include <QMouseEvent>
#include <QKeyEvent> #include <QKeyEvent>
...@@ -44,7 +44,7 @@ namespace cgt { ...@@ -44,7 +44,7 @@ namespace cgt {
/** /**
* Qt implementation of GLCanvas. Inherits QGLWidget and combines the Qt methods and cgt methods. * Qt implementation of GLCanvas. Inherits QGLWidget and combines the Qt methods and cgt methods.
*/ */
class CGT_API QtCanvas : public QGLWidget, public GLCanvas { class CGT_API QtCanvas : public QOpenGLWidget, public GLCanvas {
Q_OBJECT; Q_OBJECT;
public: public:
...@@ -150,8 +150,8 @@ public: ...@@ -150,8 +150,8 @@ public:
static cgt::MouseEvent::MouseButtons getButtons(QMouseEvent* e); static cgt::MouseEvent::MouseButtons getButtons(QMouseEvent* e);
static cgt::Event::Modifier getModifier(QInputEvent* e); static cgt::Event::Modifier getModifier(QInputEvent* e);
static KeyEvent::KeyCode getKey(int key); static KeyEvent::KeyCode getKey(int key);
static QGLFormat getQGLFormat(const Buffers buffers); static QSurfaceFormat getQGLSurfaceFormat(const Buffers buffers);
static QGLFormat getQGLFormat(); static QSurfaceFormat getQGLSurfaceFormat();
signals: signals:
void s_sizeChangedExternally(int w, int h); void s_sizeChangedExternally(int w, int h);
...@@ -161,7 +161,8 @@ protected slots: ...@@ -161,7 +161,8 @@ protected slots:
void changeFullScreen(bool fullscreen); void changeFullScreen(bool fullscreen);
protected: protected:
static QGLWidget* shareWidget_; ///< widget that this canvas shares the OpenGL context with static QOpenGLWidget* shareWidget_; ///< widget that this canvas shares the OpenGL context with
///< TODO: This is very bad design. Context sharing should happen on another level and not using a static
signals: signals:
void fullScreenChanged(bool fullscreen); void fullScreenChanged(bool fullscreen);
......
...@@ -41,8 +41,8 @@ uniform float _lambda; ...@@ -41,8 +41,8 @@ uniform float _lambda;
uniform float _minDepth; uniform float _minDepth;
uniform float _maxDepth; uniform float _maxDepth;
uniform vec3 _coldColor; uniform vec4 _coldColor;
uniform vec3 _warmColor; uniform vec4 _warmColor;
int _halfKernelDimension; int _halfKernelDimension;
float[25] _gaussKernel; float[25] _gaussKernel;
...@@ -116,10 +116,10 @@ void main() { ...@@ -116,10 +116,10 @@ void main() {
#ifdef USE_COLORCODING #ifdef USE_COLORCODING
float deltaDPlus = (deltaD > 0 ? deltaD : 0.0); float deltaDPlus = (deltaD > 0 ? deltaD : 0.0);
float deltaDMinus = (deltaD < 0 ? -deltaD : 0.0); float deltaDMinus = (deltaD < 0 ? -deltaD : 0.0);
curColor.rgb += (_coldColor * deltaDMinus + _warmColor * deltaDPlus) * _lambda; curColor.rgb += (_coldColor.rgb * _coldColor.a * deltaDMinus + _warmColor.rgb * _warmColor.a * deltaDPlus) * _lambda;
#else #else
if (deltaD < 0.0) { if (deltaD < 0.0) {
curColor.rgb += deltaD * _lambda; curColor.rgb += deltaD * _lambda * _warmColor.rgb;
} }
#endif #endif
......
...@@ -46,8 +46,8 @@ namespace campvis { ...@@ -46,8 +46,8 @@ namespace campvis {
, p_sigma("Sigma", "Sigma of Gaussian Filter", 2.f, 0.f, 10.f, 0.1f) , p_sigma("Sigma", "Sigma of Gaussian Filter", 2.f, 0.f, 10.f, 0.1f)
, p_lambda("Lambda", "Strength of Depth Darkening Effect", 10.f, 0.f, 150.f, 0.1f) , p_lambda("Lambda", "Strength of Depth Darkening Effect", 10.f, 0.f, 150.f, 0.1f)
, p_useColorCoding("UseColorCoding", "Cold/Warm Color Coding", false) , p_useColorCoding("UseColorCoding", "Cold/Warm Color Coding", false)
, p_coldColor("ColdColor", "Cold Color (Far Objects)", cgt::vec3(0.f, 0.f, 1.f), cgt::vec3(0.f), cgt::vec3(1.f)) , p_coldColor("ColdColor", "Cold Color (Far Objects)", cgt::vec4(0.f, 0.f, 1.f, 1.0f))
, p_warmColor("WarmColor", "Warm Color (Near Objects)", cgt::vec3(1.f, 0.f, 0.f), cgt::vec3(0.f), cgt::vec3(1.f)) , p_warmColor("WarmColor", "Warm Color (Near Objects)", cgt::vec4(1.f, 0.f, 0.f, 1.0f))
, _shader(0) , _shader(0)
, _glReduction(0) , _glReduction(0)
{ {
...@@ -100,9 +100,9 @@ namespace campvis { ...@@ -100,9 +100,9 @@ namespace campvis {
_shader->setUniform("_lambda", p_lambda.getValue()); _shader->setUniform("_lambda", p_lambda.getValue());
_shader->setUniform("_minDepth", minDepth); _shader->setUniform("_minDepth", minDepth);
_shader->setUniform("_maxDepth", maxDepth); _shader->setUniform("_maxDepth", maxDepth);
_shader->setUniform("_warmColor", p_warmColor.getValue());
if (p_useColorCoding.getValue()) { if (p_useColorCoding.getValue()) {
_shader->setUniform("_coldColor", p_coldColor.getValue()); _shader->setUniform("_coldColor", p_coldColor.getValue());
_shader->setUniform("_warmColor", p_warmColor.getValue());
} }
createAndAttachColorTexture(); createAndAttachColorTexture();
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "core/pipeline/visualizationprocessor.h" #include "core/pipeline/visualizationprocessor.h"
#include "core/properties/datanameproperty.h" #include "core/properties/datanameproperty.h"
#include "core/properties/floatingpointproperty.h" #include "core/properties/floatingpointproperty.h"
#include "core/properties/colorproperty.h"
#include "modules/modulesapi.h" #include "modules/modulesapi.h"
...@@ -61,7 +62,7 @@ namespace campvis { ...@@ -61,7 +62,7 @@ namespace campvis {
/// \see AbstractProcessor::deinit /// \see AbstractProcessor::deinit
virtual void deinit(); virtual void deinit();
/// To be used in ProcessorFactory static methods /// To be used in ProcessorFactory static methods
static const std::string getId() { return "DepthDarkening"; }; static const std::string getId() { return "DepthDarkening"; };
/// \see AbstractProcessor::getName() /// \see AbstractProcessor::getName()
...@@ -80,8 +81,8 @@ namespace campvis { ...@@ -80,8 +81,8 @@ namespace campvis {
FloatProperty p_lambda; ///< strength of depth effect FloatProperty p_lambda; ///< strength of depth effect
BoolProperty p_useColorCoding; ///< Flag whether to use depth color coding BoolProperty p_useColorCoding; ///< Flag whether to use depth color coding
Vec3Property p_coldColor; ///< Cold color (color for far objects) ColorProperty p_coldColor; ///< Cold color (color for far objects)
Vec3Property p_warmColor; ///< Warm color (color for near objects) ColorProperty p_warmColor; ///< Warm color (color for near objects)
protected: protected:
/// \see AbstractProcessor::updateResult /// \see AbstractProcessor::updateResult
......
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