[Improvement] (MG_Impl/Sampler): Create sampler object even when not bound.

This commit is contained in:
BZLZHH
2025-11-16 02:19:16 +08:00
parent fe7af0839e
commit 131c9a2db6
@@ -10,6 +10,9 @@ namespace MobileGL {
if (!SamplerImpl::ValidateSamplerName(sampler)) return;
auto samplerObj = MG_State::pGLContext->GetSamplerObject(sampler);
if (!samplerObj) {
samplerObj = MG_State::pGLContext->CreateSamplerObject(sampler); // for compatibility
}
if (!SamplerImpl::ValidateSamplerObject(sampler)) return;
using namespace MG_Util;
@@ -55,6 +58,9 @@ namespace MobileGL {
if (!SamplerImpl::ValidateSamplerName(sampler)) return;
auto samplerObj = MG_State::pGLContext->GetSamplerObject(sampler);
if (!samplerObj) {
samplerObj = MG_State::pGLContext->CreateSamplerObject(sampler); // for compatibility
}
if (!SamplerImpl::ValidateSamplerObject(sampler)) return;
using namespace MG_Util;