mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +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;
|
||||
}
|
||||
|
||||
auto textureObject = GetTextureObjectByName(texture, __func__);
|
||||
if (!textureObject) return;
|
||||
auto& textureObject = MG_State::pGLContext->GetTextureObject(texture);
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user