mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-03 10:58:34 -06:00
Fix loading of RGB screenspace images
This commit is contained in:
@@ -108,6 +108,10 @@ void ScreenSpaceImageLocal::update() {
|
||||
ghoul::io::TextureReader::ref().loadTexture(absPath(_texturePath));
|
||||
|
||||
if (texture) {
|
||||
// Images don't need to start on 4-byte boundaries, for example if the
|
||||
// image is only RGB
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
texture->uploadTexture();
|
||||
|
||||
// Textures of planets looks much smoother with AnisotropicMipMap rather than linear
|
||||
|
||||
@@ -131,7 +131,10 @@ void ScreenSpaceImageOnline::update() {
|
||||
);
|
||||
|
||||
if (texture) {
|
||||
// LDEBUG("Loaded texture from '" << absPath(_texturePath) << "'");
|
||||
// Images don't need to start on 4-byte boundaries, for example if the
|
||||
// image is only RGB
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
texture->uploadTexture();
|
||||
|
||||
// Textures of planets looks much smoother with AnisotropicMipMap rather than linear
|
||||
|
||||
Reference in New Issue
Block a user