diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-22 21:53:40 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-23 08:21:41 +0200 |
commit | 7a161c97f8925b4b2273ac88e5bcfe03b2fd3905 (patch) | |
tree | 7a73f9c91004903f9ec6e777c9bec081eff3131c | |
parent | 0eab67f1e424eed939c293f0b6f4566ad94e8f95 (diff) | |
download | mana-7a161c97f8925b4b2273ac88e5bcfe03b2fd3905.tar.gz mana-7a161c97f8925b4b2273ac88e5bcfe03b2fd3905.tar.bz2 mana-7a161c97f8925b4b2273ac88e5bcfe03b2fd3905.tar.xz mana-7a161c97f8925b4b2273ac88e5bcfe03b2fd3905.zip |
Specify a more specific image format when uploading textures
While simply specifying "4 components" works, it is preferred to specify
the actual image format like GL_RGBA8 in our case.
http://www.opengl.org/wiki/Common_Mistakes#Image_precision
-rw-r--r-- | src/resources/image.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 3afa479f..cf0d1483 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -491,7 +491,7 @@ Image *Image::_GLload(SDL_Surface *tmpImage) SDL_LockSurface(tmpImage); glTexImage2D( - mTextureType, 0, 4, + mTextureType, 0, GL_RGBA8, tmpImage->w, tmpImage->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, tmpImage->pixels); |