1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

LibGL: Implement GL_SAMPLES, GL_SAMPLE_BUFFERS context parameters

We do not support multisampling right now, so we return constant values
that indicate this.
This commit is contained in:
Jelle Raaijmakers 2022-09-13 10:29:43 +02:00 committed by Andreas Kling
parent 62846b4691
commit 8e3b7df408
2 changed files with 6 additions and 0 deletions

View file

@ -110,6 +110,10 @@ Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
return ContextParameter { .type = GL_BOOL, .is_capability = true, .value = { .boolean_value = m_depth_offset_enabled } };
case GL_RED_BITS:
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
case GL_SAMPLE_BUFFERS:
return ContextParameter { .type = GL_INT, .value = { .integer_value = 0 } };
case GL_SAMPLES:
return ContextParameter { .type = GL_INT, .value = { .integer_value = 1 } };
case GL_SCISSOR_BOX: {
auto scissor_box = m_rasterizer->options().scissor_box;
return ContextParameter {