mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_Impl/GLImpl): validate DSA texture unit binding [skip ci]
This commit is contained in:
@@ -2884,8 +2884,13 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto textureObject = GetTextureObjectByName(texture, __func__);
|
auto& textureObject = MG_State::pGLContext->GetTextureObject(texture);
|
||||||
if (!textureObject) return;
|
if (!textureObject) {
|
||||||
|
MG_State::pGLContext->RecordError(
|
||||||
|
ErrorCode::InvalidOperation,
|
||||||
|
MakeUnique<GenericErrorInfo>("MG_Impl/GLImpl", __func__, "Texture object does not exist."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
textureUnit.GetBindingSlot(textureObject->GetTarget()).Bind(textureObject);
|
textureUnit.GetBindingSlot(textureObject->GetTarget()).Bind(textureObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user