mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-10 21:28:32 +09:00
[Fix] (MG_Impl/GL_Program): emit missing gl error
This commit is contained in:
@@ -738,8 +738,13 @@ namespace MobileGL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UniformBlockBinding_State(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
|
void UniformBlockBinding_State(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
|
||||||
auto programObject = TryToGetProgramObject(program);
|
auto programObject = MG_State::pGLContext->GetCurrentProgram();
|
||||||
if (!programObject) return;
|
if (programObject == nullptr) {
|
||||||
|
MG_State::pGLContext->RecordError(
|
||||||
|
ErrorCode::InvalidOperation,
|
||||||
|
MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", __func__, "There is no current program object."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!programObject->GetLinkStatus()) {
|
if (!programObject->GetLinkStatus()) {
|
||||||
MG_State::pGLContext->RecordError(
|
MG_State::pGLContext->RecordError(
|
||||||
ErrorCode::InvalidOperation,
|
ErrorCode::InvalidOperation,
|
||||||
@@ -756,8 +761,13 @@ namespace MobileGL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GetActiveUniformBlockiv_State(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) {
|
void GetActiveUniformBlockiv_State(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) {
|
||||||
auto programObject = TryToGetProgramObject(program);
|
auto programObject = MG_State::pGLContext->GetCurrentProgram();
|
||||||
if (!programObject) return;
|
if (programObject == nullptr) {
|
||||||
|
MG_State::pGLContext->RecordError(
|
||||||
|
ErrorCode::InvalidOperation,
|
||||||
|
MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", __func__, "There is no current program object."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!programObject->GetLinkStatus()) {
|
if (!programObject->GetLinkStatus()) {
|
||||||
MG_State::pGLContext->RecordError(
|
MG_State::pGLContext->RecordError(
|
||||||
ErrorCode::InvalidOperation,
|
ErrorCode::InvalidOperation,
|
||||||
|
|||||||
Reference in New Issue
Block a user