mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:57:35 +00:00
LibGL: Centralize all context parameters
The `glGet*` family of functions requires that all parameters of different types are transparently converted into each other. For example, you can request a boolean parameter as a float or a list of double values as an integer. It might be considered bad practice to request parameters through the wrongly-typed function, but to be spec- compliant we need to implement this. Introduce a new `::get_context_parameter()` to obtain a parameter value, which is then converted to the right type by the respective `::gl_get_*()` functions.
This commit is contained in:
parent
2af9b625e8
commit
b1ac181537
3 changed files with 153 additions and 82 deletions
|
@ -161,6 +161,7 @@ extern "C" {
|
|||
#define GL_3_BYTES 0x1408
|
||||
#define GL_4_BYTES 0x1409
|
||||
#define GL_DOUBLE 0x140A
|
||||
#define GL_BOOL 0x8B56
|
||||
|
||||
// Format enums
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
|
@ -343,6 +344,7 @@ extern "C" {
|
|||
|
||||
// OpenGL State & GLGet
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
|
||||
//
|
||||
// OpenGL typedefs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue