Commit 4826c14b authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Fixed a truckload of warnings

- Lots of missing override definitions
- some virtual overloaded function hiding warnings
- class initializer list order
parent fd0884e8
......@@ -55,15 +55,15 @@ namespace campvis {
/**
* Schedule a repaint job for the pipeline's render target
*/
virtual void repaint();
virtual void repaint() override;
/// \see cgt::Painter::sizeChanged
virtual void sizeChanged(const cgt::ivec2& size);
virtual void sizeChanged(const cgt::ivec2& size) override;
/**
* Initializes the painter, i.e. loads the OpenGL shader.
*/
virtual void init();
virtual void init() override;
/**
* Deinitializes the painter, i.e. disposes its shader.
......@@ -83,7 +83,7 @@ namespace campvis {
/**
* Performs the actual rendering of the pipeline's render target
*/
virtual void paint();
virtual void paint() override;
static const std::string loggerCat_;
......
......@@ -83,7 +83,7 @@ namespace campvis {
cgt::Texture* tex = nullptr;
if (renderData) {
// check if we can get a GL representation of the desired texture
ImageRepresentationGL* glRep;
ImageRepresentationGL* glRep = nullptr;
if (attachment == GL_DEPTH_ATTACHMENT) {
if(auto id = (*renderData)->getDepthTexture())
glRep = const_cast<ImageRepresentationGL*>(id->getRepresentation<ImageRepresentationGL>(false));
......
......@@ -64,8 +64,8 @@ namespace campvis {
* \param vp This Visualization processor (usually pointer to this).
*/
explicit FramebufferActivationGuard(VisualizationProcessor* vp)
: _parentProcessor(vp)
, _fbo(vp->_fbo)
: //_parentProcessor(vp)
_fbo(vp->_fbo)
{
cgtAssert(_fbo != nullptr, "FBO must not be 0.");
cgtAssert(_fbo->getId() != 0, "The FBO's OpenGL ID is 0, this is wrong.");
......@@ -85,7 +85,7 @@ namespace campvis {
private:
VisualizationProcessor* _parentProcessor;
//VisualizationProcessor* _parentProcessor;
cgt::FramebufferObject* _fbo;
};
......
......@@ -28,12 +28,6 @@
#include "gltextureformattraits.h"
#pragma once
#include <GL/glew.h>
#include <string>
namespace cgt {
#define defFormat(INTERNAL_FORMAT, BPP, CHANNELS, PIXEL_FORMAT, PIXEL_DATA_TYPE, GLSL_FORMAT_QUALIFIER) \
......
......@@ -58,8 +58,8 @@ public:
/// Constructor for known formats
constexpr GLTextureFormatTraits(GLint internalFormat__, const char* internalFormatName__, int bpp__, int channels__, GLint pixelFormat__, GLint pixelDataType__, const char* glslFormatQualifier__)
: internalFormatName_{ internalFormatName__ }
, known_{ true }
: known_{ true }
, internalFormatName_{ internalFormatName__ }
, bpp_{ bpp__ }
, channels_{ channels__ }
, internalFormat_{ internalFormat__ }
......
......@@ -79,7 +79,7 @@ public:
* Called by the Qt framework once at the beginning, before rendering starts.
* This function calls the corresponding GLCanvas method \a initialize.
*/
virtual void initializeGL();
virtual void initializeGL() override;
/**
* This is called by the Qt framework every time the canvas is resized.
......@@ -88,7 +88,7 @@ public:
* @param w The new width of the canvas.
* @param h The new height of the canvas.
*/
virtual void resizeGL(int w, int h);
virtual void resizeGL(int w, int h) override;
/*
* Return the recommended size for the canvas.
......@@ -96,49 +96,49 @@ public:
* This method is called by Qt to determine how much space to allocate to display the canvas.
* The returned size is the same as reported by getSize().
*/
virtual QSize sizeHint() const;
virtual QSize sizeHint() const override;
virtual void setSize(ivec2 newSize);
virtual void setSize(ivec2 newSize) override;
/**
* Called by Qt if there is a paint event; it uses the \a painter_ to paint() something.
*/
virtual void paintGL();
virtual void paintGL() override;
/**
* If you manually want to cause a paint-event, use this function. It will call paintGL()
* via updateGL(). This will cause immediate repainting.
*/
virtual void repaint();
virtual void repaint() override;
/**
* If you manually want to cause a paint-event, use this function. It will call QWidget::update()
* and repaint when entering main loop next time.
*/
virtual void update();
virtual void update() override;
/// Acqures this canvas as current context
virtual void acquireAsCurrentContext();
virtual void acquireAsCurrentContext() override;
/// Releases this canvas as current context
virtual void releaseAsCurrentContext();
virtual void releaseAsCurrentContext() override;
/// swap buffers
virtual void swap();
virtual void swap() override;
virtual void toggleFullScreen();
virtual void toggleFullScreen() override;
virtual void enterEvent(QEvent* e);
virtual void leaveEvent(QEvent* e);
virtual void mousePressEvent(QMouseEvent* e);
virtual void mouseReleaseEvent (QMouseEvent* e);
virtual void mouseMoveEvent(QMouseEvent* e);
virtual void mouseDoubleClickEvent(QMouseEvent* e);
virtual void wheelEvent(QWheelEvent* e);
virtual void timerEvent(QTimerEvent* e);
virtual void enterEvent(QEvent* e) override;
virtual void leaveEvent(QEvent* e) override;
virtual void mousePressEvent(QMouseEvent* e) override;
virtual void mouseReleaseEvent (QMouseEvent* e) override;
virtual void mouseMoveEvent(QMouseEvent* e) override;
virtual void mouseDoubleClickEvent(QMouseEvent* e) override;
virtual void wheelEvent(QWheelEvent* e) override;
virtual void timerEvent(QTimerEvent* e) override;
virtual void keyPressEvent(QKeyEvent* event);
virtual void keyReleaseEvent(QKeyEvent* event);
virtual void keyPressEvent(QKeyEvent* event) override;
virtual void keyReleaseEvent(QKeyEvent* event) override;
///
/// Helpers used to generate cgt-Events out of qt-Events
......
......@@ -50,8 +50,8 @@ namespace cgt {
Runnable::Runnable(const std::string& threadName /*= ""*/)
: _stopExecution()
, _thread(0)
, _threadName(threadName)
, _thread(0)
{
_initFunction = [] () {};
_deinitFunction = [] () {};
......
......@@ -29,7 +29,7 @@ cgt::TextureManager::TextureManager()
#ifdef ENABLE_TEXTURE_POOL
// start the garbage collection thread
start();
#endif ENABLE_TEXTURE_POOl
#endif //ENABLE_TEXTURE_POOl
}
cgt::TextureManager::~TextureManager()
......@@ -38,7 +38,7 @@ cgt::TextureManager::~TextureManager()
// stop the GC thread and clear the pool
stop();
forceClearPool();
#endif ENABLE_TEXTURE_POOL
#endif //ENABLE_TEXTURE_POOL
cgtAssert(texturePool_.empty(), "Texture pool not empty at the end of texture manager's life!");
cgtAssert(activeAllocatedMemory_ == 0, "There are still Textures in use after the Texture Manager is destroyed! This most likely means you are leaking cgt::Texture instances!");
......@@ -122,7 +122,7 @@ void cgt::TextureManager::forceGarbageCollection()
std::lock_guard<std::mutex> scope_lock(accessMutex_);
performGarbageCollection();
#endif ENABLE_TEXTURE_POOL
#endif //ENABLE_TEXTURE_POOL
}
void cgt::TextureManager::forceClearPool()
......@@ -131,7 +131,7 @@ void cgt::TextureManager::forceClearPool()
std::lock_guard<std::mutex> scope_lock(accessMutex_);
clearPool();
#endif ENABLE_TEXTURE_POOL
#endif //ENABLE_TEXTURE_POOL
}
GLuint cgt::TextureManager::generateId(GLenum type, const cgt::svec3 & dimensions, GLenum internalFormat)
......
......@@ -39,8 +39,8 @@ namespace campvis {
, p_aoRays("AORays", "Number of directional samples", 8, 0, 50)
, p_aoSamples("AOSamples", "Number of Samples per ray (controls size of AO sphere)", 10, 0, 80)
, p_aoSphereRadius("AOSphereRadius", "AO Sphere Radius [voxels]", 8.0f, 0.1f, 50.0f, 0.25f)
, p_aoOpacityScale("OpacityScale", "Opacity Scaling", 1.0f, 0.0f, 5.f)
, p_aoEffectGamma("AOEffectGamma", "AO Scale Gamma", 1.0f, .0f, 5.f)
, p_aoOpacityScale("OpacityScale", "Opacity Scaling", 1.0f, 0.0f, 5.f)
, p_aoEmissiveTransferFunction("AOTransferFunction", "Emissive Transfer Function", new Geometry1DTransferFunction(128))
, p_aoEmissiveScale("EmissiveScale", "Emissive Color Scaling", 1.0f, 0.0f, 10.f)
{
......
......@@ -52,8 +52,8 @@ namespace campvis {
: AbstractProcessor()
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ)
, p_outputImage("OutputImage", "Output Image", "AmbientIllinationVolume", DataNameProperty::WRITE)
, p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16))
, p_transferFunction("TransferFunction", "Transfer Function", new Geometry1DTransferFunction(256, cgt::vec2(0, 1)))
, p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16))
, _shader(nullptr)
{
addProperty(p_inputImage, INVALID_RESULT | INVALID_PROPERTIES);
......
......@@ -61,22 +61,22 @@ namespace campvis {
virtual ~AmbientVolumeGenerator();
/// \see AbstractProcessor::init
virtual void init();
virtual void init() override;
/// \see AbstractProcessor::deinit
virtual void deinit();
virtual void deinit() override;
/**
* To be used in ProcessorFactory static methods
*/
static const std::string getId() { return "AmbientVolumeGenerator"; };
/// \see AbstractProcessor::getName()
virtual const std::string getName() const { return getId(); };
virtual const std::string getName() const override { return getId(); };
/// \see AbstractProcessor::getDescription()
virtual const std::string getDescription() const { return "Precomputes an local ambient occlusion volume which stores ambient color + emission for each voxel."; };
virtual const std::string getDescription() const override { return "Precomputes an local ambient occlusion volume which stores ambient color + emission for each voxel."; };
/// \see AbstractProcessor::getAuthor()
virtual const std::string getAuthor() const { return "Jakob Weiss <jakob.weiss@tum.de>"; };
virtual const std::string getAuthor() const override { return "Jakob Weiss <jakob.weiss@tum.de>"; };
/// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; };
virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; };
DataNameProperty p_inputImage; ///< ID for input volume
DataNameProperty p_outputImage; ///< ID for output gradient volume
......
......@@ -50,8 +50,8 @@ namespace campvis {
: AbstractProcessor()
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ)
, p_outputImage("OutputImage", "Output Image", "PreIntegratedVolume", DataNameProperty::WRITE)
, p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16))
, p_transferFunction("TransferFunction", "Transfer Function", new Geometry1DTransferFunction(256, cgt::vec2(0, 1)))
, p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16))
, _shader(nullptr)
{
addProperty(p_inputImage, INVALID_RESULT | INVALID_PROPERTIES);
......
......@@ -61,22 +61,22 @@ namespace campvis {
virtual ~TFPreIntegrator();
/// \see AbstractProcessor::init
virtual void init();
virtual void init() override;
/// \see AbstractProcessor::deinit
virtual void deinit();
virtual void deinit() override;
/**
* To be used in ProcessorFactory static methods
*/
static const std::string getId() { return "TFPreIntegrator"; };
/// \see AbstractProcessor::getName()
virtual const std::string getName() const { return getId(); };
virtual const std::string getName() const override { return getId(); };
/// \see AbstractProcessor::getDescription()
virtual const std::string getDescription() const { return "Transforms an intensity image with a transfer function, outputting an RGBA volume using OpenGL Compute Shaders."; };
virtual const std::string getDescription() const override { return "Transforms an intensity image with a transfer function, outputting an RGBA volume using OpenGL Compute Shaders."; };
/// \see AbstractProcessor::getAuthor()
virtual const std::string getAuthor() const { return "Jakob Weiss <jakob.weiss@tum.de>"; };
virtual const std::string getAuthor() const override { return "Jakob Weiss <jakob.weiss@tum.de>"; };
/// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; };
virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; };
DataNameProperty p_inputImage; ///< ID for input volume
DataNameProperty p_outputImage; ///< ID for output gradient volume
......
......@@ -67,7 +67,7 @@ namespace campvis {
/**
* Gets called when the property has changed, so that widget can update its state.
*/
virtual void updateWidgetFromProperty();
virtual void updateWidgetFromProperty() override;
protected slots:
/// Slot called when the selected predicate has changed.
......
......@@ -159,7 +159,7 @@ namespace campvis {
pos = cgt::vec2(position.x, pos.y - _height * 1.2f);
}
if (p >= 32 && p < 256) {
if (p >= 32 /*&& p < 256*/) {
cgt::vec2 pos2(pos.x + _glyphs[p].bitmapOffset.x, -pos.y - _glyphs[p].bitmapOffset.y);
cgt::vec2 size = _glyphs[p].bitmapSize;
......
......@@ -59,22 +59,22 @@ namespace campvis {
virtual ~MedianFilter();
/// \see AbstractProcessor::init
virtual void init();
virtual void init() override;
/// \see AbstractProcessor::deinit
virtual void deinit();
virtual void deinit() override;
/**
* To be used in ProcessorFactory static methods
*/
static const std::string getId() { return "MedianFilter"; };
/// \see AbstractProcessor::getName()
virtual const std::string getName() const { return getId(); };
virtual const std::string getName() const override { return getId(); };
/// \see AbstractProcessor::getDescription()
virtual const std::string getDescription() const { return "Performs a median filtering on the first channel of the input image using OpenGL Compute Shaders."; };
virtual const std::string getDescription() const override { return "Performs a median filtering on the first channel of the input image using OpenGL Compute Shaders."; };
/// \see AbstractProcessor::getAuthor()
virtual const std::string getAuthor() const { return "Jakob Weiss <jakob.weiss@tum.de>"; };
virtual const std::string getAuthor() const override { return "Jakob Weiss <jakob.weiss@tum.de>"; };
/// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; };
virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; };
DataNameProperty p_inputImage; ///< ID for input volume
DataNameProperty p_outputImage; ///< ID for output gradient volume
......
......@@ -20,6 +20,7 @@ using namespace Eigen;
class SparseSolverInterface
{
public:
virtual ~SparseSolverInterface() {};
/// Solver random walks system LuX=b, matrix returned as vector in column-major order
virtual std::vector<double> solve_Ax_b(SparseMatrix<double> A, SparseVector<double> b, int numel, std::vector<int> & uidx, const std::vector<int> * labels, const std::vector<int> * seeds, int active_label) = 0;
private:
......
......@@ -45,7 +45,7 @@ namespace campvis {
class VoxelHierarchyMapper;
/**
* Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sundn et al.
* Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sundn et al.
* This raycasting processor supports real-time directional light shadowing and additionally
* uses the VoxelHierarchyMapper for optimized entry-exit points.
*
......@@ -73,18 +73,18 @@ namespace campvis {
*/
static const std::string getId() { return "IpsviRaycaster"; };
/// \see AbstractProcessor::getName()
virtual const std::string getName() const { return getId(); };
virtual const std::string getName() const override { return getId(); };
/// \see AbstractProcessor::getDescription()
virtual const std::string getDescription() const { return "Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sundn et al."; };
virtual const std::string getDescription() const override { return "Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sundn et al."; };
/// \see AbstractProcessor::getAuthor()
virtual const std::string getAuthor() const { return "Christian Schulte zu Berge <christian.szb@in.tum.de>"; };
virtual const std::string getAuthor() const override { return "Christian Schulte zu Berge <christian.szb@in.tum.de>"; };
/// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; };
virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; };
/// \see AbstractProcessor::init
virtual void init();
virtual void init() override;
/// \see AbstractProcessor::deinit
virtual void deinit();
virtual void deinit() override;
DataNameProperty p_lightId; ///< Name/ID for the LightSource to use
IntProperty p_sweepLineWidth; ///< Width of the sweep line in pixels
......@@ -95,7 +95,7 @@ namespace campvis {
/// \see RaycastingProcessor::updateResult()
virtual void updateResult(DataContainer& data) override;
/// \see RaycastingProcessor::processImpl()
virtual void processImpl(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image);
virtual void processImpl(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image) override;
void processDirectional(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image, const CameraData& camera, const LightSourceData& light);
void processPointLight(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image, const CameraData& camera, const LightSourceData& light);
......
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