The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 2dd574cb authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Introducing registration module:

* OpenGl based reduction in core tools
* SimilarityMeasure processor stub
parent c9cbf53e
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
in vec3 ex_TexCoord;
out vec4 out_Color;
#include "tools/texture2d.frag"
uniform sampler2D _texture;
uniform TextureParameters2D _textureParams;
uniform vec2 _texCoordsMultiplier;
void main() {
vec2 tmp = ex_TexCoord.xy * _texCoordsMultiplier * 2.0;
ivec2 texel = ivec2((tmp * _textureParams._size));
vec4 a = texelFetch(_texture, texel, 0);
vec4 b = texelFetch(_texture, texel + ivec2(1, 0), 0);
vec4 c = texelFetch(_texture, texel + ivec2(0, 1), 0);
vec4 d = texelFetch(_texture, texel + ivec2(1, 1), 0);
out_Color = max(a, max(b, max(c, d)));
//out_Color = vec4(texel, 0.0, 1.0);
}
......@@ -44,9 +44,6 @@ namespace campvis {
, _fbo(0)
, _viewportSizeProperty(viewportSizeProp)
{
tgtAssert(_viewportSizeProperty != 0, "Pointer must not be 0!");
addProperty(&p_lqMode);
}
VisualizationProcessor::~VisualizationProcessor() {
......@@ -55,6 +52,9 @@ namespace campvis {
void VisualizationProcessor::init() {
AbstractProcessor::init();
tgtAssert(_viewportSizeProperty != 0, "The pointer to the viewport size property must not be 0!");
addProperty(&p_lqMode);
_fbo = new tgt::FramebufferObject();
_viewportSizeProperty->s_changed.connect<VisualizationProcessor>(this, &VisualizationProcessor::onPropertyChanged);
}
......
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#include "glreduction.h"
#include "tgt/logmanager.h"
#include "tgt/framebufferobject.h"
#include "tgt/shadermanager.h"
#include "tgt/texture.h"
#include "tgt/textureunit.h"
#include "core/datastructures/facegeometry.h"
#include "core/datastructures/imagedata.h"
#include "core/datastructures/imagerepresentationgl.h"
#include "core/tools/quadrenderer.h"
#include <algorithm>
#define DIV_CEIL(x,y) ((x) > 0) ? (1 + ((x) - 1)/(y)) : ((x) / (y))
namespace campvis {
const std::string GlReduction::loggerCat_ = "CAMPVis.modules.registration.GlReduction";
GlReduction::GlReduction()
: _shader(0)
, _fbo(0)
, _renderQuad(0)
{
_shader = ShdrMgr.loadSeparate("core/glsl/passthrough.vert", "core/glsl/glsl/glreduction.frag", "", false);
if (_shader == 0) {
LERROR("Could not load Shader for OpenGL reduction. Reduction will not work!");
return;
}
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
GlReduction::~GlReduction() {
}
float GlReduction::reduce(const ImageData* image) {
tgtAssert(image != 0, "Image must not be 0!");
if (_shader == 0) {
LERROR("Could not load Shader for OpenGL reduction. Reduction will not work!");
return 0.f;
}
if (image == 0) {
LERROR("Empty image received - nothing to reduce!");
return 0.f;
}
const ImageRepresentationGL* repGl = image->getRepresentation<ImageRepresentationGL>();
if (repGl == 0) {
LERROR("Could not convert input image to OpenGL texture - no reduction possible!");
return 0.f;
}
tgtAssert(image->getNumChannels() == 1, "Reduction of images with more than one channel currently not implemented! Somebody was too lazy (or stressed - deadline was close) to do that...");
const tgt::svec3& size = image->getSize();
tgt::vec2 texCoordMultiplier(1.f);
tgt::ivec2 currentSize = size.xy();
reduceSizes(currentSize, texCoordMultiplier);
// Set OpenGL pixel alignment to 1 to avoid problems with NPOT textures
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
// get a free texture unit
tgt::TextureUnit inputUnit;
// create temporary textures
for (size_t i = 0; i < 2; ++i) {
_tempTextures[i] = new tgt::Texture(0, tgt::ivec3(currentSize, 1), GL_RED, GL_R32F, GL_FLOAT, tgt::Texture::NEAREST);
//_tempTextures[i] = new tgt::Texture(0, tgt::ivec3(currentSize, 1), GL_RGBA, GL_RGBA8, GL_FLOAT, tgt::Texture::NEAREST);
_tempTextures[i]->uploadTexture();
_tempTextures[i]->setWrapping(tgt::Texture::CLAMP);
}
_readTex = 0;
_writeTex = 1;
// create and initialize FBO
_fbo = new tgt::FramebufferObject();
_fbo->activate();
LGL_ERROR;
// perform first reduction step outside:
_shader->activate();
repGl->bind(_shader, inputUnit);
_fbo->attachTexture(_tempTextures[_readTex]);
glViewport(0, 0, currentSize.x, currentSize.y);
_shader->setUniform("_texCoordsMultiplier", texCoordMultiplier);
QuadRdr.renderQuad();
LGL_ERROR;
// perform reduction until 1x1 texture remains
while (currentSize.x > 1 || currentSize.y > 1) {
reduceSizes(currentSize, texCoordMultiplier);
_fbo->attachTexture(_tempTextures[_writeTex]);
_tempTextures[_readTex]->bind();
glViewport(0, 0, currentSize.x, currentSize.y);
_shader->setUniform("_texCoordsMultiplier", texCoordMultiplier);
QuadRdr.renderQuad();
LGL_ERROR;
//_fbo->detachTexture(GL_COLOR_ATTACHMENT0);
std::swap(_writeTex, _readTex);
}
_shader->deactivate();
// read back stuff
GLenum readBackFormat = _tempTextures[_readTex]->getFormat();
size_t channels = _tempTextures[_readTex]->getNumChannels();
std::vector<float> readBackBuffer;
readBackBuffer.resize(currentSize.x * currentSize.y * channels);
glReadBuffer(GL_COLOR_ATTACHMENT0);
glReadPixels(0, 0, currentSize.x, currentSize.y, readBackFormat, GL_FLOAT, &readBackBuffer.front());
LGL_ERROR;
// clean up...
_fbo->detachAll();
_fbo->deactivate();
delete _fbo;
_fbo = 0;
delete _tempTextures[0];
delete _tempTextures[1];
LGL_ERROR;
return readBackBuffer.front();
}
void GlReduction::reduceSizes(tgt::ivec2& currentSize, tgt::vec2& texCoordMultiplier) {
if (currentSize.x > 1) {
currentSize.x = DIV_CEIL(currentSize.x, 2);
texCoordMultiplier.x /= 2.f;
}
if (currentSize.y > 1) {
currentSize.y = DIV_CEIL(currentSize.y, 2);
texCoordMultiplier.y /= 2.f;
}
}
}
\ No newline at end of file
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#ifndef GLREDUCTION_H__
#define GLREDUCTION_H__
#include "tgt/exception.h"
#include "tgt/tgt_gl.h"
#include "tgt/vector.h"
#include <string>
namespace tgt {
class FramebufferObject;
class Shader;
class Texture;
}
namespace campvis {
class ImageData;
class FaceGeometry;
/**
* Class performing a reduction of 2D image data using OpenGL.
* TODO: implement 3D reduction - shouldn't be that difficult
*/
class GlReduction {
public:
GlReduction();
~GlReduction();
float reduce(const ImageData* image);
private:
/**
* Performs a reduction of \a currentSize in each dimension and adjusts \a texCoordMultiplier.
* \param currentSize Current size to reduce (ceiling division by 2)
* \param texCoordMultiplier Tex coordinates multiplier to adjust (divide by 2 if dimension got reduced)
*/
static void reduceSizes(tgt::ivec2& currentSize, tgt::vec2& texCoordMultiplier);
size_t _readTex;
size_t _writeTex;
tgt::Shader* _shader;
tgt::FramebufferObject* _fbo;
tgt::Texture* _tempTextures[2];
FaceGeometry* _renderQuad;
const static std::string loggerCat_;
};
}
#endif // GLREDUCTION_H__
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#include "similaritymeasure.h"
#include "tgt/logmanager.h"
#include "tgt/shadermanager.h"
#include "tgt/textureunit.h"
#include "core/datastructures/facegeometry.h"
#include "core/datastructures/imagedata.h"
#include "core/datastructures/imagerepresentationgl.h"
#include "core/datastructures/renderdata.h"
#include "core/pipeline/processordecoratorbackground.h"
#include "core/classification/simpletransferfunction.h"
#include "core/tools/quadrenderer.h"
namespace campvis {
const std::string SimilarityMeasure::loggerCat_ = "CAMPVis.modules.vis.SimilarityMeasure";
SimilarityMeasure::SimilarityMeasure()
: VisualizationProcessor(0)
, p_referenceId("ReferenceId", "Reference Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES)
, p_movingId("MovingId", "Moving Image", "", DataNameProperty::READ)
, p_translation("Translation", "Moving Image Translation", tgt::vec3(0.f), tgt::vec3(-1000.f), tgt::vec3(1000.f))
, p_rotation("Rotation", "Moving Image Rotation", tgt::vec3(0.f), tgt::vec3(-90.f), tgt::vec3(90.f))
, p_viewportSize("ViewportSize", "Viewport Size", tgt::ivec2(1), tgt::ivec2(1), tgt::ivec2(1000))
, _shader(0)
{
addProperty(&p_referenceId);
addProperty(&p_movingId);
addProperty(&p_translation);
addProperty(&p_rotation);
_viewportSizeProperty = &p_viewportSize;
}
SimilarityMeasure::~SimilarityMeasure() {
}
void SimilarityMeasure::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.loadSeparate("core/glsl/passthrough.vert", "modules/registration/glsl/similaritymeasure.frag", "", false);
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void SimilarityMeasure::deinit() {
VisualizationProcessor::deinit();
ShdrMgr.dispose(_shader);
}
void SimilarityMeasure::process(DataContainer& data) {
ImageRepresentationGL::ScopedRepresentation referenceImage(data, p_referenceId.getValue());
ImageRepresentationGL::ScopedRepresentation movingImage(data, p_movingId.getValue());
if (referenceImage != 0 && movingImage != 0) {
FramebufferActivationGuard fag(this);
createAndAttachColorTexture();
createAndAttachDepthTexture();
_shader->activate();
tgt::TextureUnit firstColorUnit, firstDepthUnit, secondColorUnit, secondDepthUnit;
// firstImage->bind(_shader, firstColorUnit, firstDepthUnit, "_firstColor", "_firstDepth", "_firstTexParams");
// secondImage->bind(_shader, secondColorUnit, secondDepthUnit, "_secondColor", "_secondDepth", "_secondTexParams");
// _shader->setUniform("_compositingMethod", p_compositingMethod.getOptionValue());
// _shader->setUniform("_alpha", p_alphaValue.getValue());
//
// decorateRenderProlog(data, _shader);
// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// QuadRdr.renderQuad();
_shader->deactivate();
tgt::TextureUnit::setZeroUnit();
LGL_ERROR;
}
else {
LERROR("No suitable input image found.");
}
validate(INVALID_RESULT);
}
void SimilarityMeasure::updateProperties(DataContainer& dc) {
ScopedTypedData<ImageData> referenceImage(dc, p_referenceId.getValue());
if (referenceImage != 0) {
p_viewportSize.setValue(referenceImage->getSize().xy());
}
validate(AbstractProcessor::INVALID_PROPERTIES);
}
}
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#ifndef SIMILARITYMEASURE_H__
#define SIMILARITYMEASURE_H__
#include <string>
#include "tgt/buffer.h"
#include "tgt/vertexarrayobject.h"
#include "core/pipeline/abstractprocessordecorator.h"
#include "core/pipeline/visualizationprocessor.h"
#include "core/properties/datanameproperty.h"
#include "core/properties/floatingpointproperty.h"
#include "core/properties/genericproperty.h"
#include "core/properties/optionproperty.h"
#include "core/properties/numericproperty.h"
#include "core/properties/transferfunctionproperty.h"
namespace tgt {
class Shader;
}
namespace campvis {
class FaceGeometry;
class ImageData;
/**
* Computes a Similarity Measure using OpenGL
*/
class SimilarityMeasure : public VisualizationProcessor {
public:
/**
* Constructs a new SimilarityMeasure Processor
**/
SimilarityMeasure();
/**
* Destructor
**/
virtual ~SimilarityMeasure();
/// \see AbstractProcessor::init
virtual void init();
/// \see AbstractProcessor::deinit
virtual void deinit();
/// \see AbstractProcessor::getName()
virtual const std::string getName() const { return "SimilarityMeasure"; };
/// \see AbstractProcessor::getDescription()
virtual const std::string getDescription() const { return "Extracts a single slice from the input image and renders it using a transfer function."; };
/// \see AbstractProcessor::getAuthor()
virtual const std::string getAuthor() const { return "Christian Schulte zu Berge <christian.szb@in.tum.de>"; };
/// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::EXPERIMENTAL; };
/// \see AbstractProcessor::process()
virtual void process(DataContainer& data);
DataNameProperty p_referenceId; ///< image ID for reference image
DataNameProperty p_movingId; ///< image ID for moving image
Vec3Property p_translation; ///< Moving image translation
Vec3Property p_rotation; ///< Moving image rotation
protected:
/// \see AbstractProcessor::updateProperties
void updateProperties(DataContainer& dc);
IVec2Property p_viewportSize;
tgt::Shader* _shader; ///< Shader for slice rendering
static const std::string loggerCat_;
};
}
#endif // SIMILARITYMEASURE_H__
# CMake file for registration module
# Source files:
FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
modules/registration/pipelines/*.cpp
modules/registration/processors/*.cpp
modules/registration/tools/*.cpp
)
# Header files (including GLSL files so that they'll appear in VS projects)
FILE(GLOB ThisModHeaders RELATIVE ${ModulesDir}
modules/registration/glsl/*.frag
modules/registration/glsl/*.vert
modules/registration/pipelines/*.h
modules/registration/processors/*.h
modules/registration/tools/*.h
)
SET(ThisModShaderDirectories "modules/registration/glsl")
......@@ -82,6 +82,9 @@ namespace campvis {
glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
QuadRdr.renderQuad();
// restore state
glDrawBuffers(1, buffers);
glDisable(GL_DEPTH_TEST);
LGL_ERROR;
......
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