mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +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;
|
if (!SamplerImpl::ValidateSamplerName(sampler)) return;
|
||||||
|
|
||||||
auto samplerObj = MG_State::pGLContext->GetSamplerObject(sampler);
|
auto samplerObj = MG_State::pGLContext->GetSamplerObject(sampler);
|
||||||
|
if (!samplerObj) {
|
||||||
|
samplerObj = MG_State::pGLContext->CreateSamplerObject(sampler); // for compatibility
|
||||||
|
}
|
||||||
if (!SamplerImpl::ValidateSamplerObject(sampler)) return;
|
if (!SamplerImpl::ValidateSamplerObject(sampler)) return;
|
||||||
|
|
||||||
using namespace MG_Util;
|
using namespace MG_Util;
|
||||||
@@ -55,6 +58,9 @@ namespace MobileGL {
|
|||||||
if (!SamplerImpl::ValidateSamplerName(sampler)) return;
|
if (!SamplerImpl::ValidateSamplerName(sampler)) return;
|
||||||
|
|
||||||
auto samplerObj = MG_State::pGLContext->GetSamplerObject(sampler);
|
auto samplerObj = MG_State::pGLContext->GetSamplerObject(sampler);
|
||||||
|
if (!samplerObj) {
|
||||||
|
samplerObj = MG_State::pGLContext->CreateSamplerObject(sampler); // for compatibility
|
||||||
|
}
|
||||||
if (!SamplerImpl::ValidateSamplerObject(sampler)) return;
|
if (!SamplerImpl::ValidateSamplerObject(sampler)) return;
|
||||||
|
|
||||||
using namespace MG_Util;
|
using namespace MG_Util;
|
||||||
|
|||||||
Reference in New Issue
Block a user