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
commit e34fc4e336
Notes: sideshowbarker 2024-07-18 04:54:01 +09:00

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`