Commit d5954ead authored by Declara Denis's avatar Declara Denis Committed by Christian Schulte zu Berge
Browse files

Fixed errors due to rebase + Fixed rendering glitch in UsFanRenderer

Switch wrapping mode for texture in fan renderer, so that colors don't
bleed to the other sides on the edges.
parent 27296a28
......@@ -136,8 +136,7 @@ namespace campvis {
if (p_renderToTexture.getValue() == true) {
cgt::vec3 size = img->getSize();
cgt::Texture* resultTexture = new cgt::Texture(0, size, GL_RGB, GL_RGBA, GL_UNSIGNED_BYTE, cgt::Texture::LINEAR);
resultTexture->uploadTexture();
cgt::Texture* resultTexture = new cgt::Texture(GL_TEXTURE_2D, size, GL_RGB8, cgt::Texture::LINEAR);
_fbo->activate();
glViewport(0, 0, static_cast<GLsizei>(size.x), static_cast<GLsizei>(size.y));
......
......@@ -117,6 +117,9 @@ namespace campvis {
_shader->setUniform("halfAngle", halfAngle);
_shader->setUniform("innerRadius", innerRadius);
// Set wrapping mode to mirror, in order to avoid artefacts at the edges of the fan
const_cast<cgt::Texture*>(texture->getTexture())->setWrapping(cgt::Texture::MIRRORED_REPEAT);
FramebufferActivationGuard fag(this);
createAndAttachColorTexture();
......
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