[Feat] (MG_Backend/DirectGLES, GL_Impl/Getter): hardcode getter, sync some sampler parameters

This commit is contained in:
2025-10-29 16:39:03 +08:00
parent 683d8b35bf
commit b82c481605
4 changed files with 45 additions and 23 deletions
@@ -297,6 +297,14 @@ namespace MobileGL::MG_Backend::DirectGLES {
GLenum target = MG_Util::ConvertTextureTargetToGLEnum(textureObject->GetTarget());
backendTextureIt->second->Bind(target);
const auto& samplerObj = textureObject->GetSamplerObject();
const auto minfilter = samplerObj->GetMinFilter();
MG_External::GLES::glTexParameteri(target, GL_TEXTURE_MIN_FILTER, MG_Util::ConvertSamplerFilterModeToGLEnum(minfilter));
const auto magfilter = samplerObj->GetMagFilter();
MG_External::GLES::glTexParameteri(target, GL_TEXTURE_MAG_FILTER, MG_Util::ConvertSamplerFilterModeToGLEnum(magfilter));
MG_External::GLES::glTexParameterf(target, GL_TEXTURE_MIN_LOD, samplerObj->GetMinLod());
MG_External::GLES::glTexParameterf(target, GL_TEXTURE_MAX_LOD, samplerObj->GetMaxLod());
}
}
@@ -387,4 +395,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
MG_External::GLES::glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
dstX1, dstY1, mask, filter);
}
const GLubyte* GetString(GLenum name) {
return MG_External::GLES::glGetString(name);
}
} // namespace MobileGL::MG_Backend::DirectGLES
@@ -16,4 +16,5 @@ namespace MobileGL::MG_Backend::DirectGLES {
GLsizei drawcount, const GLint* basevertex);
void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0,
GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
const GLubyte* GetString(GLenum name);
} // namespace MobileGL::MG_Backend::DirectGLES