win32: always use RGBA for LUTs

This commit is contained in:
OV2 2013-05-18 21:48:50 +02:00
parent 5b4df91b41
commit 0b97bc02ca
1 changed files with 2 additions and 2 deletions

View File

@ -409,7 +409,7 @@ bool CGLCG::LoadShader(const TCHAR *shaderFile)
GLubyte *texData;
if(loadPngImage(tempPath,width,height,hasAlpha,&texData)) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
glTexImage2D(GL_TEXTURE_2D, 0, hasAlpha ? 4 : 3, width,
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width,
height, 0, hasAlpha ? GL_RGBA : GL_RGB, GL_UNSIGNED_BYTE, texData);
free(texData);
}
@ -417,7 +417,7 @@ bool CGLCG::LoadShader(const TCHAR *shaderFile)
STGA stga;
if(loadTGA(tempPath,stga)) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, stga.width);
glTexImage2D(GL_TEXTURE_2D, 0, 4, stga.width,
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, stga.width,
stga.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, stga.data);
}
}