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
......@@ -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() {
......
......@@ -62,8 +62,6 @@ namespace campvis {
void VirtualMirrorCombine::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/virtualmirrorcombine.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
}
void VirtualMirrorCombine::deinit() {
......
......@@ -131,8 +131,6 @@ namespace campvis {
_sliceRenderer->init();
_shader = ShdrMgr.load("core/glsl/passthrough.vert", "modules/vis/glsl/volumeexplorer.frag", "");
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
_tcp.s_invalidated.connect(this, &VolumeExplorer::onProcessorInvalidated);
_sliceRenderer->s_invalidated.connect(this, &VolumeExplorer::onProcessorInvalidated);
......
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