Added OPENGL_ES3_BIT

This commit is contained in:
Jonas Boesch 2015-03-03 15:00:43 +01:00 committed by Fraser Waters
parent af4eab290e
commit f57e411723
2 changed files with 14 additions and 1 deletions

View file

@ -53,6 +53,7 @@ namespace OpenTK.Platform.Egl
{ {
ES = Egl.OPENGL_ES_BIT, ES = Egl.OPENGL_ES_BIT,
ES2 = Egl.OPENGL_ES2_BIT, ES2 = Egl.OPENGL_ES2_BIT,
ES3 = Egl.OPENGL_ES3_BIT,
GL = Egl.OPENGL_BIT, GL = Egl.OPENGL_BIT,
VG = Egl.OPENVG_BIT, VG = Egl.OPENVG_BIT,
} }
@ -141,6 +142,7 @@ namespace OpenTK.Platform.Egl
public const int OPENVG_BIT = 2; public const int OPENVG_BIT = 2;
public const int OPENGL_ES2_BIT = 4; public const int OPENGL_ES2_BIT = 4;
public const int OPENGL_BIT = 8; public const int OPENGL_BIT = 8;
public const int OPENGL_ES3_BIT = 64;
public const int VENDOR = 12371; public const int VENDOR = 12371;
public const int VERSION = 12372; public const int VERSION = 12372;
public const int EXTENSIONS = 12373; public const int EXTENSIONS = 12373;

View file

@ -64,7 +64,18 @@ namespace OpenTK.Platform.Egl
Renderable = RenderableFlags.GL; Renderable = RenderableFlags.GL;
if ((flags & GraphicsContextFlags.Embedded) != 0) 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; RenderApi api = (Renderable & RenderableFlags.GL) != 0 ? RenderApi.GL : RenderApi.ES;