diff options
| author | Ray <[email protected]> | 2023-05-31 18:36:33 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-05-31 18:36:33 +0200 |
| commit | e497603678823dc93f01dd9686819a92d780ad67 (patch) | |
| tree | a07846b9f57b7cd42e27fd221d50dc972d9c6bf5 /src/rlgl.h | |
| parent | a18667c2e9a3a815ab37a915e582e8906ff9cace (diff) | |
| download | raylib-e497603678823dc93f01dd9686819a92d780ad67.tar.gz raylib-e497603678823dc93f01dd9686819a92d780ad67.zip | |
ADDED: Experimental support for OpenGL ES 3.0 -WIP-
Just added the required flags to request the OpenGL ES 3.0 context but it has not been tested...
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -26,6 +26,7 @@ * #define GRAPHICS_API_OPENGL_33 * #define GRAPHICS_API_OPENGL_43 * #define GRAPHICS_API_OPENGL_ES2 +* #define GRAPHICS_API_OPENGL_ES3 * Use selected OpenGL graphics backend, should be supported by platform * Those preprocessor defines are only used on rlgl module, if OpenGL version is * required by any other module, use rlGetVersion() to check it @@ -178,6 +179,11 @@ #define GRAPHICS_API_OPENGL_33 #endif +// OpenGL ES 3.0 uses OpenGL ES 2.0 functionality (and more) +#if defined(GRAPHICS_API_OPENGL_ES3) + #define GRAPHICS_API_OPENGL_ES2 +#endif + // Support framebuffer objects by default // NOTE: Some driver implementation do not support it, despite they should #define RLGL_RENDER_TEXTURES_HINT @@ -382,7 +388,8 @@ typedef enum { RL_OPENGL_21, // OpenGL 2.1 (GLSL 120) RL_OPENGL_33, // OpenGL 3.3 (GLSL 330) RL_OPENGL_43, // OpenGL 4.3 (using GLSL 330) - RL_OPENGL_ES_20 // OpenGL ES 2.0 (GLSL 100) + RL_OPENGL_ES_20, // OpenGL ES 2.0 (GLSL 100) + RL_OPENGL_ES_30 // OpenGL ES 3.0 (GLSL 300 es) } rlGlVersion; // Trace log level @@ -2389,15 +2396,17 @@ int rlGetVersion(void) #endif #if defined(GRAPHICS_API_OPENGL_21) glVersion = RL_OPENGL_21; +#elif defined(GRAPHICS_API_OPENGL_43) + glVersion = RL_OPENGL_43; #elif defined(GRAPHICS_API_OPENGL_33) glVersion = RL_OPENGL_33; #endif -#if defined(GRAPHICS_API_OPENGL_43) - glVersion = RL_OPENGL_43; -#endif -#if defined(GRAPHICS_API_OPENGL_ES2) +#if defined(GRAPHICS_API_OPENGL_ES3) + glVersion = RL_OPENGL_ES_30; +#elif defined(GRAPHICS_API_OPENGL_ES2) glVersion = RL_OPENGL_ES_20; #endif + return glVersion; } |
