From 80a4bac43b671e07aa42f3106cca9f0d9bca50f1 Mon Sep 17 00:00:00 2001 From: Anselme Date: Mon, 7 Dec 2015 17:27:57 +0100 Subject: [PATCH] changed texture format to standard RGB --- texture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/texture.cpp b/texture.cpp index f9bfc9b..ae1ccd9 100644 --- a/texture.cpp +++ b/texture.cpp @@ -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));