mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 03:00:58 -06:00
Adapt to explicit specifcation of texture size (#1794)
* Adapt to explicit specifcation of texture size
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user