mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Improvement] (MG_Impl/Sampler): Create sampler object even when not bound.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user