mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
LibGL: Allow all primitives in glBegin()
We check for primitive support in `glEnd()`, so we do not need to preemptively reject the mode in `glBegin()`. This allows `glBegin()` to be invoked with `GL_POINTS`, for example.
This commit is contained in:
parent
e3d5a11d84
commit
011f6542db
1 changed files with 2 additions and 2 deletions
|
@ -250,7 +250,7 @@ void SoftwareGLContext::gl_begin(GLenum mode)
|
||||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_begin, mode);
|
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_begin, mode);
|
||||||
|
|
||||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||||
RETURN_WITH_ERROR_IF(mode < GL_TRIANGLES || mode > GL_POLYGON, GL_INVALID_ENUM);
|
RETURN_WITH_ERROR_IF(mode > GL_POLYGON, GL_INVALID_ENUM);
|
||||||
|
|
||||||
m_current_draw_mode = mode;
|
m_current_draw_mode = mode;
|
||||||
m_in_draw_state = true; // Certain commands will now generate an error
|
m_in_draw_state = true; // Certain commands will now generate an error
|
||||||
|
@ -330,7 +330,7 @@ void SoftwareGLContext::gl_end()
|
||||||
&& m_current_draw_mode != GL_POLYGON) {
|
&& m_current_draw_mode != GL_POLYGON) {
|
||||||
|
|
||||||
m_vertex_list.clear_with_capacity();
|
m_vertex_list.clear_with_capacity();
|
||||||
dbgln_if(GL_DEBUG, "gl_end: draw mode {:#x} unsupported", m_current_draw_mode);
|
dbgln_if(GL_DEBUG, "gl_end(): draw mode {:#x} unsupported", m_current_draw_mode);
|
||||||
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