Commit 59d1c4fb authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Minor changes in core

- Fixed bug with worldToTexture matrix
- default texture clamping is now CLAMP_TO_BORDER
parent 2123a4af
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ ext/tbb
*LUA_wrap.cxx

# CMake build folders and IDE folders
build/
build14/
build15/
build*/
.vs/
.vscode/
buildClang/
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ namespace campvis {
        if (! _textureToWorldTransformation.invert(_worldToTextureTransformation))
            cgtAssert(false, "Could not invert texture-to-world matrix. That should not happen!");
        _textureToWorldTransformationInvTransp = cgt::transpose(_worldToTextureTransformation);
        _worldToTextureTransformation = cgt::transpose(_textureToWorldTransformation);
        _worldToTextureTransformationInvTransp = cgt::transpose(_textureToWorldTransformation);

        _voxelToWorldTransformation = _customTransformation * cgt::mat4::createTranslation(_offset) * cgt::mat4::createScale(_voxelSize);
        if (! _voxelToWorldTransformation.invert(_worldToVoxelTransformation))
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ namespace campvis {
        _texture->bind();

        _texture->uploadTexture(reinterpret_cast<GLubyte*>(wtp._pointer), wtp.getGlFormat(), wtp.getGlDataType());
        _texture->setWrapping(cgt::Texture::CLAMP_TO_EDGE);
        _texture->setWrapping(cgt::Texture::CLAMP_TO_BORDER);

        cgt::TextureUnit::setZeroUnit();
        LGL_ERROR;