summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-05-08 01:46:46 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-09 21:49:48 +0200
commit582fb3f263e78ead074f20a23533b85b3a737abd (patch)
treeb0597e636551abb7913b2b31223b63b6d7c5bc6a /Userland
parent0abb7df09be1579b450e852686050183a1ccffdf (diff)
downloadserenity-582fb3f263e78ead074f20a23533b85b3a737abd.zip
LibGL+LibGPU: Copy line width to rasterizer in `glLineWidth`
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGL/GLContext.cpp3
-rw-r--r--Userland/Libraries/LibGPU/RasterizerOptions.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GLContext.cpp b/Userland/Libraries/LibGL/GLContext.cpp
index 4e5f0ff436..2056ae929e 100644
--- a/Userland/Libraries/LibGL/GLContext.cpp
+++ b/Userland/Libraries/LibGL/GLContext.cpp
@@ -1144,6 +1144,9 @@ void GLContext::gl_line_width(GLfloat width)
RETURN_WITH_ERROR_IF(width <= 0, GL_INVALID_VALUE);
m_line_width = width;
+ auto options = m_rasterizer->options();
+ options.line_width = width;
+ m_rasterizer->set_options(options);
}
void GLContext::gl_push_attrib(GLbitfield mask)
diff --git a/Userland/Libraries/LibGPU/RasterizerOptions.h b/Userland/Libraries/LibGPU/RasterizerOptions.h
index cd7cb3563c..a5ae66c6c1 100644
--- a/Userland/Libraries/LibGPU/RasterizerOptions.h
+++ b/Userland/Libraries/LibGPU/RasterizerOptions.h
@@ -39,6 +39,7 @@ struct RasterizerOptions {
float fog_start { 0.0f };
float fog_end { 1.0f };
bool line_smooth { false };
+ float line_width { 1.f };
bool point_smooth { false };
float point_size { 1.f };
bool scissor_enabled { false };