1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00:00

LibGL: Add capabilities to context parameters

Context parameters are LibGL's way of centrally defining all parameters
that can be retrieved through `glGetBoolean*`, `glGetInteger*`, etc.
The spec describes that capabilities such as `GL_LIGHTING` can also be
retrieved through these methods, but it should not be possible to
retrieve random boolean parameters through `glIsEnabled`. For example,
`GL_UNPACK_LSB_FIRST` can only be retrieved through `glGet*`.

This moves reading of capabilities to `::get_context_parameter` and
implements its use in `::gl_is_enabled`.
This commit is contained in:
Jelle Raaijmakers 2022-01-08 17:10:56 +01:00 committed by Linus Groh
parent 09a11fa6ea
commit 7ad18e91e2
2 changed files with 30 additions and 36 deletions

View file

@ -28,6 +28,7 @@ namespace GL {
struct ContextParameter {
GLenum type;
bool is_capability { false };
u8 count { 1 };
union {
bool boolean_value;