changed texture format to standard RGB

This commit is contained in:
Anselme 2015-12-07 17:27:57 +01:00
parent 280fd4d1fd
commit 80a4bac43b

View File

@ -50,10 +50,10 @@ void Texture::initPixels(Image* myImage, GLenum target)
switch(myImage->depth)
{
case 32:
glAssert(glTexImage2D(target, 0, GL_RGBA, myImage->width, myImage->height, 0, GL_BGRA, GL_UNSIGNED_BYTE, myImage->pixels));
glAssert(glTexImage2D(target, 0, GL_RGBA, myImage->width, myImage->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, myImage->pixels));
break;
case 24:
glAssert(glTexImage2D(target, 0, GL_RGB, myImage->width, myImage->height, 0, GL_BGR, GL_UNSIGNED_BYTE, myImage->pixels));
glAssert(glTexImage2D(target, 0, GL_RGB, myImage->width, myImage->height, 0, GL_RGB, GL_UNSIGNED_BYTE, myImage->pixels));
break;
case 8:
glAssert(glTexImage2D(target, 0, GL_R8, myImage->width, myImage->height, 0, GL_RED, GL_UNSIGNED_BYTE, myImage->pixels));