diff --git a/Source/OpenTK/Platform/Egl/Egl.cs b/Source/OpenTK/Platform/Egl/Egl.cs index 9d539da0..be75453a 100644 --- a/Source/OpenTK/Platform/Egl/Egl.cs +++ b/Source/OpenTK/Platform/Egl/Egl.cs @@ -53,6 +53,7 @@ namespace OpenTK.Platform.Egl { ES = Egl.OPENGL_ES_BIT, ES2 = Egl.OPENGL_ES2_BIT, + ES3 = Egl.OPENGL_ES3_BIT, GL = Egl.OPENGL_BIT, VG = Egl.OPENVG_BIT, } @@ -141,6 +142,7 @@ namespace OpenTK.Platform.Egl public const int OPENVG_BIT = 2; public const int OPENGL_ES2_BIT = 4; public const int OPENGL_BIT = 8; + public const int OPENGL_ES3_BIT = 64; public const int VENDOR = 12371; public const int VERSION = 12372; public const int EXTENSIONS = 12373; diff --git a/Source/OpenTK/Platform/Egl/EglContext.cs b/Source/OpenTK/Platform/Egl/EglContext.cs index 13f8ec86..07673d35 100644 --- a/Source/OpenTK/Platform/Egl/EglContext.cs +++ b/Source/OpenTK/Platform/Egl/EglContext.cs @@ -64,7 +64,18 @@ namespace OpenTK.Platform.Egl Renderable = RenderableFlags.GL; if ((flags & GraphicsContextFlags.Embedded) != 0) { - Renderable = major > 1 ? RenderableFlags.ES2 : RenderableFlags.ES; + switch (major) + { + case 3: + Renderable = RenderableFlags.ES3; + break; + case 2: + Renderable = RenderableFlags.ES2; + break; + default: + Renderable = RenderableFlags.ES; + break; + } } RenderApi api = (Renderable & RenderableFlags.GL) != 0 ? RenderApi.GL : RenderApi.ES;