mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibGL: Stub glClear
support for stencil buffer
Previously, if the client supplied `GL_STENCIL_BUFFER_BIT`, `glClear` would return an error. Since it is a valid parameter, we now continue and report that this parameter is unimplemented instead.
This commit is contained in:
parent
688adba1a8
commit
b455e6ca0d
1 changed files with 3 additions and 1 deletions
|
@ -181,7 +181,7 @@ void SoftwareGLContext::gl_clear(GLbitfield mask)
|
|||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_clear, mask);
|
||||
|
||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
RETURN_WITH_ERROR_IF(mask & ~(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT), GL_INVALID_ENUM);
|
||||
RETURN_WITH_ERROR_IF(mask & ~(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT), GL_INVALID_ENUM);
|
||||
|
||||
if (mask & GL_COLOR_BUFFER_BIT)
|
||||
m_rasterizer.clear_color(m_clear_color);
|
||||
|
@ -190,6 +190,8 @@ void SoftwareGLContext::gl_clear(GLbitfield mask)
|
|||
m_rasterizer.clear_depth(static_cast<float>(m_clear_depth));
|
||||
|
||||
// FIXME: implement GL_STENCIL_BUFFER_BIT
|
||||
if (mask & GL_STENCIL_BUFFER_BIT)
|
||||
dbgln_if(GL_DEBUG, "gl_clear(): GL_STENCIL_BUFFER_BIT is unimplemented");
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue