mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Chore] (MG_Backend/DirectGLES): fix param order in GenerateTextureFormatInfo
This commit is contained in:
@@ -774,7 +774,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
|
||||
GLenum format = GL_DEPTH_COMPONENT;
|
||||
GLenum type = GL_UNSIGNED_INT;
|
||||
TextureImpl::GenerateTextureFormatInfo(mglInternalFormat, &internalformat, &format, &type);
|
||||
TextureImpl::GenerateTextureFormatInfo(mglInternalFormat, &internalformat, &type, &format);
|
||||
TexturePixelDataType texturePixelDataType = MG_Util::ConvertGLEnumToTexturePixelDataType(type);
|
||||
|
||||
bool isDepthFormat =
|
||||
|
||||
@@ -367,8 +367,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
|
||||
// Regenerate all mipmap levels
|
||||
GLenum glInternalFormat, glType, glFormat;
|
||||
TextureImpl::GenerateTextureFormatInfo(textureMipmapObject->GetFormat(), &glInternalFormat, &glType,
|
||||
&glFormat);
|
||||
TextureImpl::GenerateTextureFormatInfo(textureMipmapObject->GetFormat(), &glInternalFormat,
|
||||
&glFormat, &glType);
|
||||
|
||||
const auto& uploadTargets = textureMipmapObject->GetUploadTargets();
|
||||
for (auto uploadTarget : uploadTargets) {
|
||||
@@ -422,8 +422,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
{ // Update all dirty mipmap levels
|
||||
const auto mipmapCount = textureMipmapObject->GetMipmapLevelCount();
|
||||
GLenum glInternalFormat, glType, glFormat;
|
||||
TextureImpl::GenerateTextureFormatInfo(textureMipmapObject->GetFormat(), &glInternalFormat, &glType,
|
||||
&glFormat);
|
||||
TextureImpl::GenerateTextureFormatInfo(textureMipmapObject->GetFormat(), &glInternalFormat,
|
||||
&glFormat, &glType);
|
||||
const auto& uploadTargets = textureMipmapObject->GetUploadTargets();
|
||||
for (auto uploadTarget : uploadTargets) {
|
||||
for (SizeT level = 0; level < mipmapCount; ++level) {
|
||||
@@ -490,8 +490,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
auto backendId = backendBufferObject->GetBackendBufferId();
|
||||
|
||||
GLenum glInternalFormat, glType, glFormat;
|
||||
TextureImpl::GenerateTextureFormatInfo(textureBufferObject->GetFormat(), &glInternalFormat, &glType,
|
||||
&glFormat);
|
||||
TextureImpl::GenerateTextureFormatInfo(textureBufferObject->GetFormat(), &glInternalFormat,
|
||||
&glFormat, &glType);
|
||||
|
||||
MG_External::GLES::glTexBuffer(GL_TEXTURE_BUFFER, glInternalFormat, backendId);
|
||||
break;
|
||||
@@ -1088,7 +1088,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
Int width = static_cast<Int>(stateRBOObject->GetWidth());
|
||||
Int height = static_cast<Int>(stateRBOObject->GetHeight());
|
||||
GLenum glInternalFormat, glType, glFormat;
|
||||
TextureImpl::GenerateTextureFormatInfo(internalFormat, &glInternalFormat, &glType, &glFormat);
|
||||
TextureImpl::GenerateTextureFormatInfo(internalFormat, &glInternalFormat,
|
||||
&glFormat, &glType);
|
||||
|
||||
MG_External::GLES::glRenderbufferStorage(GL_RENDERBUFFER, glInternalFormat, static_cast<GLsizei>(width),
|
||||
static_cast<GLsizei>(height));
|
||||
|
||||
@@ -67,13 +67,14 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
MG_External::GLES::glBindTexture(m_target, m_previousBinding);
|
||||
}
|
||||
|
||||
void GenerateTextureFormatInfo(TextureInternalFormat internalFormat, GLenum* outInternalFormat, GLenum* outType,
|
||||
GLenum* outFormat) {
|
||||
void GenerateTextureFormatInfo(TextureInternalFormat internalFormat, GLenum* outInternalFormat,
|
||||
GLenum* outFormat, GLenum* outType) {
|
||||
#ifdef TRACY_ENABLE
|
||||
ZoneScopedC(TRACY_ZONECOLOR_BACKEND);
|
||||
#endif
|
||||
MG_Util::TextureFormatProcessor::NormalizePixelFormat(MG_Util::ConvertTextureInternalFormatToGLEnum(internalFormat), outInternalFormat,
|
||||
outFormat, outType);
|
||||
MG_Util::TextureFormatProcessor::NormalizePixelFormat(
|
||||
MG_Util::ConvertTextureInternalFormatToGLEnum(internalFormat), outInternalFormat,
|
||||
outFormat, outType);
|
||||
}
|
||||
} // namespace TextureImpl
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
GLint m_previousBinding = 0;
|
||||
};
|
||||
|
||||
void GenerateTextureFormatInfo(TextureInternalFormat internalFormat, GLenum* outInternalFormat, GLenum* outType,
|
||||
GLenum* outFormat);
|
||||
void GenerateTextureFormatInfo(TextureInternalFormat internalFormat, GLenum* outInternalFormat,
|
||||
GLenum* outFormat, GLenum* outType);
|
||||
} // namespace TextureImpl
|
||||
|
||||
namespace FramebufferImpl {
|
||||
|
||||
Reference in New Issue
Block a user