|
10 | 10 | #include "imgui.h"
|
11 | 11 | #include "imgui_impl_sdl3.h"
|
12 | 12 | #include "imgui_impl_opengl3.h"
|
| 13 | + |
13 | 14 | #include <stdio.h>
|
14 |
| -#include <SDL3/SDL.h> |
| 15 | + |
| 16 | +#include <SDL3/SDL_main.h> |
| 17 | +#include <SDL3/SDL_test_common.h> |
| 18 | + |
15 | 19 | #if defined(IMGUI_IMPL_OPENGL_ES2)
|
16 | 20 | #include <SDL3/SDL_opengles2.h>
|
| 21 | +#elif defined(IMGUI_IMPL_OPENGL_ES3) |
| 22 | +#include <GLES3/gl3.h> |
| 23 | +#include <SDL3/SDL_opengles2.h> |
17 | 24 | #else
|
18 | 25 | #include <SDL3/SDL_opengl.h>
|
19 | 26 | #endif
|
@@ -41,6 +48,13 @@ int main(int, char**)
|
41 | 48 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
|
42 | 49 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
|
43 | 50 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
|
| 51 | +#elif defined(IMGUI_IMPL_OPENGL_ES3) |
| 52 | + // GL ES 3.0 + GLSL 100 |
| 53 | + const char* glsl_version = "#version 100"; |
| 54 | + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0); |
| 55 | + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); |
| 56 | + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); |
| 57 | + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); |
44 | 58 | #elif defined(__APPLE__)
|
45 | 59 | // GL 3.2 Core + GLSL 150
|
46 | 60 | const char* glsl_version = "#version 150";
|
|
0 commit comments