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
...@@ -50,8 +50,6 @@ ext/tbb ...@@ -50,8 +50,6 @@ ext/tbb
*LUA_wrap.cxx *LUA_wrap.cxx
# CMake build folders and IDE folders # CMake build folders and IDE folders
build/ build*/
build14/ .vs/
build15/
.vscode/ .vscode/
buildClang/
...@@ -67,7 +67,7 @@ namespace campvis { ...@@ -67,7 +67,7 @@ namespace campvis {
if (! _textureToWorldTransformation.invert(_worldToTextureTransformation)) if (! _textureToWorldTransformation.invert(_worldToTextureTransformation))
cgtAssert(false, "Could not invert texture-to-world matrix. That should not happen!"); cgtAssert(false, "Could not invert texture-to-world matrix. That should not happen!");
_textureToWorldTransformationInvTransp = cgt::transpose(_worldToTextureTransformation); _textureToWorldTransformationInvTransp = cgt::transpose(_worldToTextureTransformation);
_worldToTextureTransformation = cgt::transpose(_textureToWorldTransformation); _worldToTextureTransformationInvTransp = cgt::transpose(_textureToWorldTransformation);
_voxelToWorldTransformation = _customTransformation * cgt::mat4::createTranslation(_offset) * cgt::mat4::createScale(_voxelSize); _voxelToWorldTransformation = _customTransformation * cgt::mat4::createTranslation(_offset) * cgt::mat4::createScale(_voxelSize);
if (! _voxelToWorldTransformation.invert(_worldToVoxelTransformation)) if (! _voxelToWorldTransformation.invert(_worldToVoxelTransformation))
......
...@@ -100,7 +100,7 @@ namespace campvis { ...@@ -100,7 +100,7 @@ namespace campvis {
_texture->bind(); _texture->bind();
_texture->uploadTexture(reinterpret_cast<GLubyte*>(wtp._pointer), wtp.getGlFormat(), wtp.getGlDataType()); _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(); cgt::TextureUnit::setZeroUnit();
LGL_ERROR; LGL_ERROR;
......
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