mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibGL+LibGPU: Implement GL_POINT_SMOOTH
context parameter
This commit is contained in:
parent
0dcb23ee96
commit
f13d4cd3a0
3 changed files with 14 additions and 0 deletions
|
@ -78,6 +78,8 @@ Optional<ContextParameter> 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<GLdouble>(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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue