summaryrefslogtreecommitdiff
path: root/plugins/opengl/src/texture.cpp
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-03-16 10:18:16 +0100
committerDanny Baumann <dannybaumann@web.de>2009-03-16 10:18:16 +0100
commit59666304be35773fcb4c9c7eeef40695e6203c8c (patch)
tree658e5ab592b9e7ab4870b42973be34d66dafdf4c /plugins/opengl/src/texture.cpp
parentd8971221a3d271d18879d625aaaf89cc0df9eb63 (diff)
downloadmobileperf-59666304be35773fcb4c9c7eeef40695e6203c8c.tar.gz
mobileperf-59666304be35773fcb4c9c7eeef40695e6203c8c.tar.bz2
Whitespace fixes.
Diffstat (limited to 'plugins/opengl/src/texture.cpp')
-rw-r--r--plugins/opengl/src/texture.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/opengl/src/texture.cpp b/plugins/opengl/src/texture.cpp
index 3e7b015..5728caa 100644
--- a/plugins/opengl/src/texture.cpp
+++ b/plugins/opengl/src/texture.cpp
@@ -296,6 +296,7 @@ PrivateTexture::loadImageData (const char *image,
rv[0] = t;
GLTexture::Matrix matrix = _identity_matrix;
+ CompOption *opt;
GLint internalFormat;
GLenum target;
bool mipmap;
@@ -324,9 +325,11 @@ PrivateTexture::loadImageData (const char *image,
glBindTexture (target, t->name ());
- internalFormat =
- (GLScreen::get(screen)->getOption ("texture_compression")->value ().b ()
- && GL::textureCompression ? GL_COMPRESSED_RGBA_ARB : GL_RGBA);
+ opt = GLScreen::get (screen)->getOption ("texture_compression");
+ if (opt->value ().b () && GL::textureCompression)
+ internalFormat = GL_COMPRESSED_RGBA_ARB;
+ else
+ internalFormat = GL_RGBA;
glTexImage2D (target, 0, internalFormat, width, height, 0,
format, type, image);
@@ -482,7 +485,7 @@ TfpTexture::bindPixmapToTexture (Pixmap pixmap,
else if (config->textureTargets & GLX_TEXTURE_RECTANGLE_BIT_EXT)
target = GLX_TEXTURE_RECTANGLE_EXT;
- /* Workaround for broken texture from pixmap implementations,
+ /* Workaround for broken texture from pixmap implementations,
that don't advertise any texture target in the fbconfig. */
if (!target)
{