1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

LibGL: Define GL_ES_VERSION_2_0

GLES 2.0 is a subset of OpenGL, so we allow applications to compile
against LibGL as if it fully supports GLES 2.0.

Additionally, we set the definitions to an integer value of `1` so
applications that check for availability like this...

    int main() { return GL_ES_VERSION_2_0; }

...can actually compile. At least ScummVM uses this, and Mesa defines
their constants in the same way:

44b9e11ddb/include/GL/gl.h (L105)
This commit is contained in:
Jelle Raaijmakers 2021-12-01 13:02:32 +01:00 committed by Andreas Kling
parent 23257cac52
commit 6d4a5a40a0

View file

@ -15,12 +15,13 @@ extern "C" {
# define GLAPI extern # define GLAPI extern
#endif #endif
#define GL_VERSION_1_0 #define GL_VERSION_1_0 1
#define GL_VERSION_1_1 #define GL_VERSION_1_1 1
#define GL_VERSION_1_2 #define GL_VERSION_1_2 1
#define GL_VERSION_1_3 #define GL_VERSION_1_3 1
#define GL_VERSION_1_4 #define GL_VERSION_1_4 1
#define GL_VERSION_1_5 #define GL_VERSION_1_5 1
#define GL_ES_VERSION_2_0 1
// OpenGL related `defines` // OpenGL related `defines`
#define GL_TRUE 1 #define GL_TRUE 1