Commit 2123a4af authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Various minor fixes:

* added buildClang to .gitignore
* Minimum required glsl version is now 430 by default (might be possible to downgrade again by checking on a per-module basis)
* More of the base modules now register their processors into the factory.
* Minor bugfixes in optimizedraycaster (inverted gradient dir) and glimageresampler (renamed variable)
parent 5cbfe490
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -54,3 +54,4 @@ build/
build14/
build15/
.vscode/
buildClang/
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ namespace campvis {
            LERRORC("CAMPVis.core.init", "Your system does not support GLSL Shader Version 3.30, which is mandatory. CAMPVis will probably not work as intended.");
        }

        ShdrMgr.setDefaultGlslVersion("330");
        ShdrMgr.setDefaultGlslVersion("430");
        for (auto it = searchPaths.cbegin(); it != searchPaths.cend(); ++it) {
            ShdrMgr.addPath(*it);
            ShdrMgr.addPath(*it + "/core/glsl");
+4 −1
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ namespace campvis {
    class AbstractProcessor;
    class DataContainer;

    template <typename T>
    using has_ivec2_constructor = decltype(T::foobar);

    /**
     * Factory for creating processors by their name.
     * Using some template-magic, ProcessorFactory is able to register processors during static 
@@ -211,7 +214,7 @@ namespace campvis {
    };

    template<typename T>
    const size_t campvis::SmartProcessorRegistrar<T>::_helperField = ProcessorRegistrarSwitch< T, std::is_base_of<VisualizationProcessor, T>::value >::_factoryId;
    const size_t campvis::SmartProcessorRegistrar<T>::_helperField = ProcessorRegistrarSwitch< T, std::is_constructible<T, IVec2Property*>::value>::_factoryId;

}

+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
IF(${ModuleEnabled})
	# Source files:
    FILE(GLOB ThisModSources RELATIVE ${ModulesDir}
        modules/base/base.cpp
		modules/base/processors/*.cpp
	)

modules/base/base.cpp

0 → 100644
+40 −0
Original line number Diff line number Diff line
// ================================================================================================
// 
// This file is part of the CAMPVis Software Framework.
// 
// If not explicitly stated otherwise: Copyright (C) 2012-2015, all rights reserved,
//      Christian Schulte zu Berge <christian.szb@in.tum.de>
//      Chair for Computer Aided Medical Procedures
//      Technische Universitaet Muenchen
//      Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
// 
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 
// except in compliance with the License. You may obtain a copy of the License at
// 
// http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the 
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
// either express or implied. See the License for the specific language governing permissions 
// and limitations under the License.
// 
// ================================================================================================

#include "core/pipeline/pipelinefactory.h"
#include "core/pipeline/processorfactory.h"

#include "modules/base/processors/lightsourceprovider.h"
#include "modules/base/processors/dataseriessplitter.h"
#include "modules/base/processors/matrixprocessor.h"
#include "modules/base/processors/trackballcameraprovider.h"

namespace campvis {

    // explicitly instantiate templates to register the processors
    template class SmartProcessorRegistrar<DataSeriesSplitter>;
    template class SmartProcessorRegistrar<LightSourceProvider>;
    template class SmartProcessorRegistrar<MatrixProcessor>;
    template class SmartProcessorRegistrar<TrackballCameraProvider>;
}
Loading