mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
LibGL: Reduce nesting levels in gl_tex_env
This commit is contained in:
parent
8cf91a5ae5
commit
92ecd66490
1 changed files with 16 additions and 20 deletions
|
@ -1970,8 +1970,12 @@ void SoftwareGLContext::gl_tex_env(GLenum target, GLenum pname, GLfloat param)
|
||||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_tex_env, target, pname, param);
|
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_tex_env, target, pname, param);
|
||||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||||
|
|
||||||
if (target == GL_TEXTURE_ENV) {
|
// FIXME: We currently only support a subset of possible target values. Implement the rest!
|
||||||
if (pname == GL_TEXTURE_ENV_MODE) {
|
RETURN_WITH_ERROR_IF(target != GL_TEXTURE_ENV, GL_INVALID_ENUM);
|
||||||
|
|
||||||
|
// FIXME: We currently only support a subset of possible pname values. Implement the rest!
|
||||||
|
RETURN_WITH_ERROR_IF(pname != GL_TEXTURE_ENV_MODE, GL_INVALID_ENUM);
|
||||||
|
|
||||||
auto param_enum = static_cast<GLenum>(param);
|
auto param_enum = static_cast<GLenum>(param);
|
||||||
|
|
||||||
switch (param_enum) {
|
switch (param_enum) {
|
||||||
|
@ -1982,15 +1986,7 @@ void SoftwareGLContext::gl_tex_env(GLenum target, GLenum pname, GLfloat param)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// FIXME: We currently only support a subset of possible param values. Implement the rest!
|
// FIXME: We currently only support a subset of possible param values. Implement the rest!
|
||||||
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
dbgln_if(GL_DEBUG, "gl_tex_env({:#x}, {:#x}, {}): param unimplemented", target, pname, param);
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// FIXME: We currently only support a subset of possible pname values. Implement the rest!
|
|
||||||
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// FIXME: We currently only support a subset of possible target values. Implement the rest!
|
|
||||||
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue