mirror of
https://github.com/MobileGL-Dev/MobileGlues.git
synced 2025-09-22 18:53:35 -04:00
fix(texture): BGRA hack to make Optfine shaders and Xaero maps both work.
This commit is contained in:
parent
e05d002096
commit
d6d7f76e84
@ -295,7 +295,7 @@ void glTexImage2D(GLenum target, GLint level,GLint internalFormat,GLsizei width,
|
||||
}
|
||||
LOAD_GLES(glTexImage2D, void, GLenum target, GLint level,GLint internalFormat,GLsizei width, GLsizei height,GLint border, GLenum format, GLenum type,const GLvoid* pixels);
|
||||
gles_glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
|
||||
if (tex.format == GL_BGRA && internalFormat == GL_RGBA8) {
|
||||
if (tex.format == GL_BGRA && internalFormat == GL_RGBA8 && width <= 128 && height <= 128) { // xaero has 64x64 tiles...hack here
|
||||
LOG_D("Detected GL_BGRA format @ tex = %d, do swizzle", bound_texture);
|
||||
if (tex.swizzle_param[0] == 0) { // assert this as never called glTexParameteri(..., GL_TEXTURE_SWIZZLE_R, ...)
|
||||
tex.swizzle_param[0] = GL_RED;
|
||||
|
Loading…
x
Reference in New Issue
Block a user