The name of the initial branch for new projects is now "main" instead of "master". Existing projects remain unchanged. More information: https://doku.lrz.de/display/PUBLIC/GitLab

Commit 083a730a authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Major fix for AMD GPUs.

Apparently, glBindAttribLocation() does not work as planned with AMD GPUs. Therefore, all Shaders yielded black images. Replaced all attribute locations with hard-coded ones in the vertex shader and removed corresponding convenience function from cgt::Shader.

refs #382
parent fef9f926
......@@ -129,8 +129,6 @@ namespace campvis {
void CampVisPainter::init() {
try {
_copyShader = ShdrMgr.load("core/glsl/passthrough.vert", "core/glsl/copyimage.frag", "");
_copyShader->setAttributeLocation(0, "in_Position");
_copyShader->setAttributeLocation(1, "in_TexCoords");
}
catch (cgt::Exception& e) {
LFATAL("Encountered cgt::Exception: " << e.what());
......
......@@ -111,8 +111,6 @@ namespace campvis {
initAllProperties();
_paintShader = ShdrMgr.load("core/glsl/passthrough.vert", "application/glsl/datacontainerinspector.frag", "");
_paintShader->setAttributeLocation(0, "in_Position");
_paintShader->setAttributeLocation(1, "in_TexCoords");
createQuad();
// set this as painter to get notified when window size changes
......
......@@ -152,11 +152,7 @@ namespace campvis {
template<class T>
void campvis::GenericGeometryTransferFunction<T>::initShader() {
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "core/glsl/passthrough.frag", "");
if (_shader != 0) {
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(2, "in_Color");
}
else {
if (_shader == nullptr) {
LERROR("Could not create Shader for Rendering the TF into the lookup texture!");
}
}
......
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, 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.
//
// ================================================================================================
void main() {
// just pass everything through to fragment shader.
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
gl_FrontColor = gl_Color;
}
\ No newline at end of file
......@@ -22,9 +22,9 @@
//
// ================================================================================================
in vec3 in_Position; ///< incoming vertex position
in vec3 in_TexCoord; ///< incoming texture coordinate
in vec4 in_Color; ///< incoming color
layout(location = 0) in vec3 in_Position; ///< incoming vertex position
layout(location = 1) in vec3 in_TexCoord; ///< incoming texture coordinate
layout(location = 2) in vec4 in_Color; ///< incoming color
out vec3 ex_TexCoord; ///< outgoing texture coordinate
out vec4 ex_Color; ///< outgoing color
......
......@@ -70,8 +70,6 @@ namespace campvis {
void RaycastingProcessor::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.loadWithCustomGlslVersion("core/glsl/passthrough.vert", "", _fragmentShaderFilename, generateHeader(), _customGlslVersion);
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_minReduction = new GlReduction(GlReduction::MIN);
_maxReduction = new GlReduction(GlReduction::MAX);
......
......@@ -100,8 +100,6 @@ namespace campvis {
void SliceRenderProcessor::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.loadWithCustomGlslVersion("core/glsl/passthrough.vert", "", _fragmentShaderFilename, getGlslHeader(), _customGlslVersion);
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void SliceRenderProcessor::deinit() {
......
......@@ -61,8 +61,6 @@ namespace campvis {
_fbo = new cgt::FramebufferObject();
_copyShader = ShdrMgr.load("core/glsl/passthrough.vert", "core/glsl/copyimage.frag", "");
_copyShader->setAttributeLocation(0, "in_Position");
_copyShader->setAttributeLocation(1, "in_TexCoord");
}
void ViewportSplitter::deinit() {
......
......@@ -58,13 +58,6 @@ namespace campvis {
LERROR("Could not load Shader for OpenGL reduction. Reduction will not work!");
return;
}
_shader1d->setAttributeLocation(0, "in_Position");
_shader1d->setAttributeLocation(1, "in_TexCoord");
_shader2d->setAttributeLocation(0, "in_Position");
_shader2d->setAttributeLocation(1, "in_TexCoord");
_shader3d->setAttributeLocation(0, "in_Position");
_shader3d->setAttributeLocation(1, "in_TexCoord");
}
GlReduction::~GlReduction() {
......
......@@ -1288,10 +1288,12 @@ void Shader::setAttribute(GLint index, const Vector4<GLuint>& v) {
glVertexAttrib4uiv(index, v.elem);
}
// ATTENTION: This method was deliberately deactivated, since it was not working as expected
// with AMD GPUs.
// Attribute locations
void Shader::setAttributeLocation(GLuint index, const std::string& name) {
glBindAttribLocation(id_, index, name.c_str());
}
//void Shader::setAttributeLocation(GLuint index, const std::string& name) {
// glBindAttribLocation(id_, index, name.c_str());
//}
GLint Shader::getAttributeLocation(const string& name) {
GLint l;
......
......@@ -393,7 +393,9 @@ public:
static void setAttribute(GLint index, const Vector4<GLuint>& v);
// Attribute locations
void setAttributeLocation(GLuint index, const std::string& name);
// ATTENTION: This method was deliberately deactivated, since it was not working as expected
// with AMD GPUs.
// void setAttributeLocation(GLuint index, const std::string& name);
GLint getAttributeLocation(const std::string& name);
// Normalized attributes
......
......@@ -106,8 +106,6 @@ namespace campvis {
void AdvancedUsFusion::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/advancedusvis/glsl/advancedusfusion.frag", generateHeader());
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void AdvancedUsFusion::deinit() {
......
......@@ -75,8 +75,6 @@ namespace campvis {
VisualizationProcessor::init();
_shader = ShdrMgr.loadWithCustomGlslVersion("core/glsl/passthrough.vert", "", "modules/advancedusvis/glsl/pointpredicateevaluator.frag", generateHeader(), "400");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
p_histogram.s_headerChanged.connect(this, &PointPredicateEvaluator::onHistogramHeaderChanged);
}
......
......@@ -67,8 +67,6 @@ namespace campvis {
VisualizationProcessor::init();
_shader = ShdrMgr.loadWithCustomGlslVersion("core/glsl/passthrough.vert", "", "modules/advancedusvis/glsl/scanlinedistributioncomputation.frag", generateHeader(), "400");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_viewportSizeProperty->s_changed.disconnect(this);
setPropertyInvalidationLevel(*_viewportSizeProperty, VALID);
......
......@@ -22,9 +22,9 @@
//
// ================================================================================================
in vec3 in_Position; ///< incoming vertex position
in vec3 in_TexCoord; ///< incoming texture coordinate
in vec4 in_Color; ///< incoming color
layout(location = 0) in vec3 in_Position; ///< incoming vertex position
layout(location = 1) in vec3 in_TexCoord; ///< incoming texture coordinate
layout(location = 2) in vec4 in_Color; ///< incoming color
out vec3 vert_TexCoord; ///< outgoing texture coordinate
out vec4 vert_Color; ///< outgoing color
......
......@@ -67,9 +67,6 @@ namespace campvis {
void GeometryStrainRenderer::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/geometrystrainrenderer.frag", "");
if (_shader != 0) {
_shader->setAttributeLocation(0, "in_Position");
}
}
void GeometryStrainRenderer::deinit() {
......
......@@ -75,10 +75,6 @@ namespace campvis {
void StrainFiberRenderer::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("modules/columbia/glsl/strainfiberrenderer.vert", "modules/columbia/glsl/strainfiberrenderer.geom", "modules/columbia/glsl/strainfiberrenderer.frag", generateGlslHeader());
if (_shader != 0) {
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
invalidate(AbstractProcessor::INVALID_SHADER);
}
......
......@@ -77,8 +77,6 @@ namespace campvis {
void DevilImageReader::init() {
AbstractImageReader::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "core/glsl/copyimage.frag", "#define NO_DEPTH\n");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void DevilImageReader::deinit() {
......
......@@ -22,9 +22,9 @@
//
// ================================================================================================
in vec3 in_Position; ///< incoming vertex position
in vec3 in_TexCoord; ///< incoming texture coordinate
in vec4 in_Color; ///< incoming color
layout(location = 0) in vec3 in_Position; ///< incoming vertex position
layout(location = 1) in vec3 in_TexCoord; ///< incoming texture coordinate
layout(location = 2) in vec4 in_Color; ///< incoming color
out vec3 vert_TexCoord; ///< outgoing texture coordinate
out vec4 vert_Position; ///< outgoing world coordinates
......
......@@ -82,10 +82,6 @@ namespace dti {
void FiberRenderer::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("modules/dti/glsl/fiberrenderer.vert", "modules/dti/glsl/fiberrenderer.geom", "modules/dti/glsl/fiberrenderer.frag", generateGlslHeader());
if (_shader != 0) {
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
invalidate(AbstractProcessor::INVALID_SHADER);
}
......
......@@ -117,8 +117,6 @@ namespace campvis {
LDEBUG("Generated a " << w << " x "<< h << " texture atlas");
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/fontrendering/glsl/fontatlas.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
LGL_ERROR;
}
......
......@@ -64,8 +64,6 @@ namespace campvis {
void IxpvCompositor::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/ixpv/glsl/ixpvcompositor.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void IxpvCompositor::deinit() {
......
......@@ -122,8 +122,6 @@ namespace campvis {
void ManualTissueSegmenter::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/manualsegmentation/glsl/manualtissuesegmenter.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_controlPoints.push_back(std::map< int, std::vector< ControlPoint > >());
_segmentation.addLayer(TissueSegmentation::Layer());
......
......@@ -93,12 +93,7 @@ namespace neuro {
void MultiVolumeMprRenderer::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("modules/vis/glsl/geometryrenderer.vert", "modules/vis/glsl/geometryrenderer.geom", "modules/neuro/glsl/multivolumemprrenderer.frag", generateHeader());
if (_shader != nullptr) {
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
}
void MultiVolumeMprRenderer::deinit() {
......
......@@ -90,16 +90,7 @@ namespace neuro {
VisualizationProcessor::init();
_eepShader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/neuro/glsl/multivolumeraycaster_eep.frag", generateHeader());
if (_eepShader != nullptr) {
_eepShader->setAttributeLocation(0, "in_Position");
_eepShader->setAttributeLocation(1, "in_TexCoord");
}
_rcShader = ShdrMgr.loadWithCustomGlslVersion("core/glsl/passthrough.vert", "", "modules/neuro/glsl/multivolumeraycaster_rc.frag", generateHeader(), "400");
if (_rcShader != nullptr) {
_rcShader->setAttributeLocation(0, "in_Position");
_rcShader->setAttributeLocation(1, "in_TexCoord");
}
_vhm1 = new VoxelHierarchyMapper();
_vhm2 = new VoxelHierarchyMapper();
......
......@@ -67,12 +67,7 @@ namespace campvis {
VisualizationProcessor::init();
_shader2D = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glgaussianfilter.frag", "#define GAUSSIAN_2D\n");
_shader2D->setAttributeLocation(0, "in_Position");
_shader2D->setAttributeLocation(1, "in_TexCoord");
_shader3D = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glgaussianfilter.frag", "#define GAUSSIAN_3D\n");
_shader3D->setAttributeLocation(0, "in_Position");
_shader3D->setAttributeLocation(1, "in_TexCoord");
// create kernel buffer
cgt::TextureUnit inputUnit;
......
......@@ -64,8 +64,6 @@ namespace campvis {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glgradientvolumegenerator.frag", generateHeader());
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void GlGradientVolumeGenerator::deinit() {
......
......@@ -63,12 +63,7 @@ namespace campvis {
VisualizationProcessor::init();
_shader2D = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glimagecrop.frag", "#define GLIMAGECROP_2D\n");
_shader2D->setAttributeLocation(0, "in_Position");
_shader2D->setAttributeLocation(1, "in_TexCoord");
_shader3D = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glimagecrop.frag", "#define GLIMAGECROP_3D\n");
_shader3D->setAttributeLocation(0, "in_Position");
_shader3D->setAttributeLocation(1, "in_TexCoord");
}
void GlImageCrop::deinit() {
......
......@@ -62,12 +62,7 @@ namespace campvis {
VisualizationProcessor::init();
_shader2D = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glimageresampler.frag", "#define GLRESAMPLER_2D\n");
_shader2D->setAttributeLocation(0, "in_Position");
_shader2D->setAttributeLocation(1, "in_TexCoord");
_shader3D = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glimageresampler.frag", "#define GLRESAMPLER_3D\n");
_shader3D->setAttributeLocation(0, "in_Position");
_shader3D->setAttributeLocation(1, "in_TexCoord");
}
void GlImageResampler::deinit() {
......
......@@ -67,8 +67,6 @@ namespace campvis {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glintensityquantizer.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void GlIntensityQuantizer::deinit() {
......
......@@ -71,12 +71,7 @@ namespace campvis {
VisualizationProcessor::init();
_erosionFilter = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/GlMorphologyFilter.frag", generateGlslHeader("min"));
_erosionFilter->setAttributeLocation(0, "in_Position");
_erosionFilter->setAttributeLocation(1, "in_TexCoord");
_dilationFilter = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/GlMorphologyFilter.frag", generateGlslHeader("max"));
_dilationFilter->setAttributeLocation(0, "in_Position");
_dilationFilter->setAttributeLocation(1, "in_TexCoord");
}
void GlMorphologyFilter::deinit() {
......
......@@ -62,8 +62,6 @@ namespace campvis {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/preprocessing/glsl/glsignaltonoiseratiofilter.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void GlSignalToNoiseRatioFilter::deinit() {
......
......@@ -74,8 +74,6 @@ namespace campvis {
VisualizationProcessor::init();
_shader = ShdrMgr.loadWithCustomGlslVersion("core/glsl/passthrough.vert", "", "modules/preprocessing/glsl/glvesselnessfilter.frag", "", "400");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void GlVesselnessFilter::deinit() {
......
......@@ -26,14 +26,13 @@
#include "cgt/event/keyevent.h"
#include "cgt/openglgarbagecollector.h"
#include "cgt/opengljobprocessor.h"
#include "cgt/painter.h"
#include "core/classification/geometry1dtransferfunction.h"
#include "core/classification/tfgeometry1d.h"
#include "core/datastructures/renderdata.h"
#include "core/tools/glreduction.h"
#include "core/tools/job.h"
#include "core/tools/opengljobprocessor.h"
namespace campvis {
static const GenericOption<nlopt::algorithm> optimizers[3] = {
......@@ -117,7 +116,8 @@ namespace campvis {
void NloptRegistration::onPerformOptimizationClicked() {
// Evaluation of the similarity measure needs an OpenGL context, so we need to create an OpenGL job for this.
GLJobProc.enqueueJob(_canvas, makeJobOnHeap(this, &NloptRegistration::performOptimization), OpenGLJobProcessor::SerialJob);
cgt::GLContextScopedLock lockGuard(_canvas);
performOptimization();
}
void NloptRegistration::performOptimization() {
......
......@@ -97,16 +97,8 @@ namespace campvis {
void SimilarityMeasure::init() {
VisualizationProcessor::init();
_sadssdCostFunctionShader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/registration/glsl/similaritymeasuresadssd.frag", "");
_sadssdCostFunctionShader->setAttributeLocation(0, "in_Position");
_sadssdCostFunctionShader->setAttributeLocation(1, "in_TexCoord");
_nccsnrCostFunctionShader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/registration/glsl/similaritymeasurenccsnr.frag", "");
_nccsnrCostFunctionShader->setAttributeLocation(0, "in_Position");
_nccsnrCostFunctionShader->setAttributeLocation(1, "in_TexCoord");
_differenceShader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/registration/glsl/differenceimage.frag", "");
_differenceShader->setAttributeLocation(0, "in_Position");
_differenceShader->setAttributeLocation(1, "in_TexCoord");
_glr = new GlReduction(GlReduction::PLUS);
}
......@@ -168,13 +160,11 @@ namespace campvis {
cgt::Shader* leShader = _sadssdCostFunctionShader;
cgt::Texture* similarityTex = 0;
cgt::Texture* similarityTex2 = 0;
similarityTex = new cgt::Texture(0, cgt::ivec3(p_viewportSize.getValue(), 1), GL_RGBA, GL_RGBA32F, GL_FLOAT, cgt::Texture::NEAREST);
similarityTex->uploadTexture();
similarityTex = new cgt::Texture(GL_TEXTURE_2D, cgt::ivec3(p_viewportSize.getValue(), 1), GL_RGBA32F, cgt::Texture::NEAREST);
similarityTex->setWrapping(cgt::Texture::CLAMP);
// NCC and SNR need a second texture and a different shader...
if (p_metric.getOptionValue() == "NCC" || p_metric.getOptionValue() == "SNR") {
similarityTex2 = new cgt::Texture(0, cgt::ivec3(p_viewportSize.getValue(), 1), GL_RGBA, GL_RGBA32F, GL_FLOAT, cgt::Texture::NEAREST);
similarityTex2->uploadTexture();
similarityTex2 = new cgt::Texture(GL_TEXTURE_2D, cgt::ivec3(p_viewportSize.getValue(), 1), GL_RGBA32F, cgt::Texture::NEAREST);
similarityTex2->setWrapping(cgt::Texture::CLAMP);
leShader = _nccsnrCostFunctionShader;
}
......@@ -293,8 +283,7 @@ namespace campvis {
referenceUnit.activate();
// create temporary texture for result
cgt::Texture* differenceImage = new cgt::Texture(0, cgt::ivec3(size), GL_RED, GL_R32F, GL_FLOAT, cgt::Texture::LINEAR);
differenceImage->uploadTexture();
cgt::Texture* differenceImage = new cgt::Texture(GL_TEXTURE_3D, cgt::ivec3(size), GL_R32F, cgt::Texture::LINEAR);
differenceImage->setWrapping(cgt::Texture::CLAMP_TO_EDGE);
// bind input images
......
......@@ -67,9 +67,6 @@ namespace campvis {
void DepthDarkening::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/depthdarkening.frag", generateHeader());
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_glReduction = new GlReduction(GlReduction::MIN_MAX_DEPTH_ONLY);
}
......
......@@ -75,10 +75,6 @@ namespace campvis {
void EEPGenerator::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/eepgenerator.frag", generateHeader());
if (_shader != 0) {
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
}
void EEPGenerator::deinit() {
......
......@@ -75,8 +75,6 @@ namespace campvis {
void MprRenderer::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/mprrenderer.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void MprRenderer::deinit() {
......
......@@ -73,12 +73,7 @@ namespace campvis {
void OrientationOverlay::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/orientationoverlay.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_passthroughShader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/quadview.frag", "");
_passthroughShader->setAttributeLocation(0, "in_Position");
_passthroughShader->setAttributeLocation(1, "in_TexCoord");
createCube();
......
......@@ -60,8 +60,6 @@ namespace campvis {
void QuadView::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/quadview.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void QuadView::deinit() {
......
......@@ -75,8 +75,6 @@ namespace campvis {
void RenderTargetCompositor::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/rendertargetcompositor.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void RenderTargetCompositor::deinit() {
......
......@@ -76,8 +76,6 @@ namespace campvis {
void SliceRenderer2D::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/slicerenderer2d.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void SliceRenderer2D::deinit() {
......
......@@ -67,8 +67,6 @@ namespace campvis {
void SliceRenderer3D::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/slicerenderer3d.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void SliceRenderer3D::deinit() {
......