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

LibGL: Generate GL extension string dynamically during construction

LibGL will now generate the GL extension string in the constructor and
refer to it later on when the string is queried via glGetString().
Currently we only check whether the device supports non-power-of-two
textures and add GL_ARB_texture_non_power_of_two to the supported
extensions in that case.
This commit is contained in:
Stephan Unverwerth 2022-01-15 17:22:59 +01:00 committed by Andreas Kling
parent 5505f353e8
commit d3d12c2fe7
2 changed files with 26 additions and 3 deletions

View file

@ -157,6 +157,8 @@ private:
void sync_light_state();
void sync_stencil_configuration();
void build_extension_string();
template<typename T>
T* store_in_listing(T value)
{
@ -432,6 +434,9 @@ private:
bool m_color_material_enabled { false };
GLenum m_color_material_face { GL_FRONT_AND_BACK };
GLenum m_color_material_mode { GL_AMBIENT_AND_DIFFUSE };
// GL Extension string
String m_extensions;
};
}