diff --git a/Userland/Libraries/LibGL/ContextParameter.cpp b/Userland/Libraries/LibGL/ContextParameter.cpp index 2457a1c850..566b93feb1 100644 --- a/Userland/Libraries/LibGL/ContextParameter.cpp +++ b/Userland/Libraries/LibGL/ContextParameter.cpp @@ -78,6 +78,8 @@ Optional GLContext::get_context_parameter(GLenum name) return ContextParameter { .type = GL_INT, .value = { .integer_value = 0 } }; case GL_PACK_SWAP_BYTES: return ContextParameter { .type = GL_BOOL, .value = { .boolean_value = false } }; + case GL_POINT_SMOOTH: + return ContextParameter { .type = GL_BOOL, .is_capability = true, .value = { .boolean_value = m_point_smooth } }; case GL_POINT_SIZE: return ContextParameter { .type = GL_DOUBLE, .value = { .double_value = static_cast(m_point_size) } }; case GL_POLYGON_OFFSET_FILL: @@ -216,6 +218,11 @@ void GLContext::gl_disable(GLenum capability) rasterizer_options.normalization_enabled = false; update_rasterizer_options = true; break; + case GL_POINT_SMOOTH: + m_point_smooth = false; + rasterizer_options.point_smooth = false; + update_rasterizer_options = true; + break; case GL_POLYGON_OFFSET_FILL: m_depth_offset_enabled = false; rasterizer_options.depth_offset_enabled = false; @@ -345,6 +352,11 @@ void GLContext::gl_enable(GLenum capability) rasterizer_options.normalization_enabled = true; update_rasterizer_options = true; break; + case GL_POINT_SMOOTH: + m_point_smooth = true; + rasterizer_options.point_smooth = true; + update_rasterizer_options = true; + break; case GL_POLYGON_OFFSET_FILL: m_depth_offset_enabled = true; rasterizer_options.depth_offset_enabled = true; diff --git a/Userland/Libraries/LibGL/GLContext.h b/Userland/Libraries/LibGL/GLContext.h index 9093a414be..a6c82a15e6 100644 --- a/Userland/Libraries/LibGL/GLContext.h +++ b/Userland/Libraries/LibGL/GLContext.h @@ -484,6 +484,7 @@ private: u8 m_unpack_alignment { 4 }; // Point drawing configuration + bool m_point_smooth { false }; float m_point_size { 1.f }; // Line drawing configuration diff --git a/Userland/Libraries/LibGPU/RasterizerOptions.h b/Userland/Libraries/LibGPU/RasterizerOptions.h index 62e7d0f593..d74d7e912a 100644 --- a/Userland/Libraries/LibGPU/RasterizerOptions.h +++ b/Userland/Libraries/LibGPU/RasterizerOptions.h @@ -38,6 +38,7 @@ struct RasterizerOptions { bool fog_enabled { false }; float fog_start { 0.0f }; float fog_end { 1.0f }; + bool point_smooth { false }; float point_size { 1.f }; bool scissor_enabled { false }; bool normalization_enabled { false };