mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
Revert "[Misc] (MG_Backend/DirectGLES): Handle GL_BGRA as GL_RGBA in ReadPixels and GetTexImage."
This reverts commit 2ad7e2da40.
This commit is contained in:
@@ -1244,8 +1244,6 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
MGLOG_D("ReadPixels: x=%d y=%d w=%d h=%d format=%s type=%s pixels=%p", x, y, width, height,
|
MGLOG_D("ReadPixels: x=%d y=%d w=%d h=%d format=%s type=%s pixels=%p", x, y, width, height,
|
||||||
MG_Util::ConvertGLEnumToString(format).c_str(), MG_Util::ConvertGLEnumToString(type).c_str(), pixels);
|
MG_Util::ConvertGLEnumToString(format).c_str(), MG_Util::ConvertGLEnumToString(type).c_str(), pixels);
|
||||||
|
|
||||||
if (format == GL_BGRA) format = GL_RGBA; // FIXME: convert RGBA to BGRA
|
|
||||||
|
|
||||||
MOBILEGL_ASSERT(format == GL_RGBA || format == GL_RGBA_INTEGER,
|
MOBILEGL_ASSERT(format == GL_RGBA || format == GL_RGBA_INTEGER,
|
||||||
"Only GL_RGBA and GL_RGBA_INTEGER are supported currently, while requested %s.",
|
"Only GL_RGBA and GL_RGBA_INTEGER are supported currently, while requested %s.",
|
||||||
MG_Util::ConvertGLEnumToString(format).c_str());
|
MG_Util::ConvertGLEnumToString(format).c_str());
|
||||||
@@ -1328,8 +1326,6 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
MG_Util::ConvertGLEnumToString(target).c_str(), level, MG_Util::ConvertGLEnumToString(format).c_str(),
|
MG_Util::ConvertGLEnumToString(target).c_str(), level, MG_Util::ConvertGLEnumToString(format).c_str(),
|
||||||
MG_Util::ConvertGLEnumToString(type).c_str(), pixels);
|
MG_Util::ConvertGLEnumToString(type).c_str(), pixels);
|
||||||
|
|
||||||
if (format == GL_BGRA) format = GL_RGBA; // FIXME: convert RGBA to BGRA
|
|
||||||
|
|
||||||
MOBILEGL_ASSERT(format == GL_RGBA || format == GL_RGBA_INTEGER,
|
MOBILEGL_ASSERT(format == GL_RGBA || format == GL_RGBA_INTEGER,
|
||||||
"Only GL_RGBA and GL_RGBA_INTEGER are supported currently, while requested %s.",
|
"Only GL_RGBA and GL_RGBA_INTEGER are supported currently, while requested %s.",
|
||||||
MG_Util::ConvertGLEnumToString(format).c_str());
|
MG_Util::ConvertGLEnumToString(format).c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user