summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-01-22 00:54:03 +0100
committerLinus Groh <mail@linusgroh.de>2022-02-22 23:48:59 +0000
commit011f6542db1c349868550653f96fed685a40861b (patch)
treec7c3239a17391226255c4b2a5bc4676d9fdab80b /Userland/Libraries/LibGL
parente3d5a11d841bb817677c9daa608d0c4a0a8a25f8 (diff)
downloadserenity-011f6542db1c349868550653f96fed685a40861b.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r--Userland/Libraries/LibGL/SoftwareGLContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp
index 565d66ac0e..a6354ed227 100644
--- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp
+++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp
@@ -250,7 +250,7 @@ void SoftwareGLContext::gl_begin(GLenum 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(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_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_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);
}