summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-22 21:53:40 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-08-05 17:15:37 +0200
commit020ddd64a48229a8d5e9dcccf4fe1fe71c840450 (patch)
treefd92ce22f59b10087fccc99ad499325715e7a6a6 /src
parent1bc84de412775abcef84c1f604160121f245b131 (diff)
downloadmana-020ddd64a48229a8d5e9dcccf4fe1fe71c840450.tar.gz
mana-020ddd64a48229a8d5e9dcccf4fe1fe71c840450.tar.bz2
mana-020ddd64a48229a8d5e9dcccf4fe1fe71c840450.tar.xz
mana-020ddd64a48229a8d5e9dcccf4fe1fe71c840450.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 Reviewed-by: Erik Schilling
Diffstat (limited to 'src')
-rw-r--r--src/resources/image.cpp2
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);