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:
parent
09a11fa6ea
commit
7ad18e91e2
2 changed files with 30 additions and 36 deletions
|
@ -28,6 +28,7 @@ namespace GL {
|
|||
|
||||
struct ContextParameter {
|
||||
GLenum type;
|
||||
bool is_capability { false };
|
||||
u8 count { 1 };
|
||||
union {
|
||||
bool boolean_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue