diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-22 21:53:40 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-08-05 17:15:37 +0200 |
commit | 020ddd64a48229a8d5e9dcccf4fe1fe71c840450 (patch) | |
tree | fd92ce22f59b10087fccc99ad499325715e7a6a6 /src/resources/image.cpp | |
parent | 1bc84de412775abcef84c1f604160121f245b131 (diff) | |
download | mana-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/resources/image.cpp')
-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); |