Adapt to explicit specifcation of texture size (#1794)

* Adapt to explicit specifcation of texture size
This commit is contained in:
Alexander Bock
2021-12-26 19:19:04 +01:00
committed by GitHub
parent 01e17266b6
commit 76b9c7587b
38 changed files with 117 additions and 55 deletions

View File

@@ -195,6 +195,7 @@ void TransferFunction::setTextureFromTxt() {
_texture = std::make_unique<ghoul::opengl::Texture>(
transferFunction,
glm::size3_t(width, 1, 1),
GL_TEXTURE_1D,
ghoul::opengl::Texture::Format::RGBA,
GL_RGBA,
GL_FLOAT,
@@ -204,7 +205,7 @@ void TransferFunction::setTextureFromTxt() {
}
void TransferFunction::setTextureFromImage() {
_texture = ghoul::io::TextureReader::ref().loadTexture(_filepath.string());
_texture = ghoul::io::TextureReader::ref().loadTexture(_filepath.string(), 1);
_texture->setWrapping(ghoul::opengl::Texture::WrappingMode::ClampToEdge);
}