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

LibGL: Support additional enums in glGetIntegerv

GL_MAX_TETXURE_UNITS: Returns the available units for multitexturing
GL_MAX_TETXURE_SIZE: Returns the maximum width/height for textures
This commit is contained in:
Stephan Unverwerth 2021-08-31 22:30:04 +02:00 committed by Ali Mohammad Pur
parent 7c60f4bbab
commit e34fc4e336

View file

@ -1418,6 +1418,12 @@ void SoftwareGLContext::gl_get_integerv(GLenum pname, GLint* data)
case GL_BLEND_DST_ALPHA:
*data = m_blend_destination_factor;
break;
case GL_MAX_TEXTURE_UNITS:
*data = m_texture_units.size();
break;
case GL_MAX_TEXTURE_SIZE:
*data = 4096;
break;
default:
// According to the Khronos docs, we always return GL_INVALID_ENUM if we encounter a non-accepted value
// for `pname`