|
@@ -14,6 +14,8 @@ namespace GL {
|
|
Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
|
|
Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
|
|
{
|
|
{
|
|
switch (name) {
|
|
switch (name) {
|
|
|
|
+ case GL_ACTIVE_TEXTURE:
|
|
|
|
+ return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(GL_TEXTURE0 + m_active_texture_unit_index) } };
|
|
case GL_ALPHA_BITS:
|
|
case GL_ALPHA_BITS:
|
|
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
|
|
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
|
|
case GL_ALPHA_TEST:
|
|
case GL_ALPHA_TEST:
|
|
@@ -26,6 +28,8 @@ Optional<ContextParameter> GLContext::get_context_parameter(GLenum name)
|
|
return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(m_blend_source_factor) } };
|
|
return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(m_blend_source_factor) } };
|
|
case GL_BLUE_BITS:
|
|
case GL_BLUE_BITS:
|
|
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
|
|
return ContextParameter { .type = GL_INT, .value = { .integer_value = sizeof(u8) * 8 } };
|
|
|
|
+ case GL_CLIENT_ACTIVE_TEXTURE:
|
|
|
|
+ return ContextParameter { .type = GL_INT, .value = { .integer_value = static_cast<GLint>(GL_TEXTURE0 + m_client_active_texture) } };
|
|
case GL_COLOR_MATERIAL:
|
|
case GL_COLOR_MATERIAL:
|
|
return ContextParameter { .type = GL_BOOL, .is_capability = true, .value = { .boolean_value = m_color_material_enabled } };
|
|
return ContextParameter { .type = GL_BOOL, .is_capability = true, .value = { .boolean_value = m_color_material_enabled } };
|
|
case GL_COLOR_MATERIAL_FACE:
|
|
case GL_COLOR_MATERIAL_FACE:
|