Fixed some paletted textures not showing up in GLES compatibility mode.

This commit is contained in:
Jean-Philip Desjardins 2015-06-04 03:20:24 -04:00
parent 84dae88787
commit 649cbf5eb5

View File

@ -362,7 +362,12 @@ void CGSH_OpenGL::TexUploader_Psm48H(uint32 bufPtr, uint32 bufWidth, unsigned in
dst += texWidth;
}
#ifdef GLES_COMPATIBILITY
//GL_ALPHA isn't allowed in GL 3.2+
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, texWidth, texHeight, 0, GL_RED, GL_UNSIGNED_BYTE, m_pCvtBuffer);
#else
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, texWidth, texHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, m_pCvtBuffer);
#endif
}
void CGSH_OpenGL::TexUpdater_Invalid(uint32 bufPtr, uint32 bufWidth, unsigned int texX, unsigned int texY, unsigned int texWidth, unsigned int texHeight)
@ -452,7 +457,12 @@ void CGSH_OpenGL::TexUpdater_Psm48H(uint32 bufPtr, uint32 bufWidth, unsigned int
dst += texWidth;
}
#ifdef GLES_COMPATIBILITY
//GL_ALPHA isn't allowed in GL 3.2+
glTexSubImage2D(GL_TEXTURE_2D, 0, texX, texY, texWidth, texHeight, GL_RED, GL_UNSIGNED_BYTE, m_pCvtBuffer);
#else
glTexSubImage2D(GL_TEXTURE_2D, 0, texX, texY, texWidth, texHeight, GL_ALPHA, GL_UNSIGNED_BYTE, m_pCvtBuffer);
#endif
}
/////////////////////////////////////////////////////////////