From b987b10c705dc28bf77666d8462dec2a8402f674 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 14 Jan 2011 01:57:59 +0000 Subject: [PATCH] * EglGraphicsMode.cs: Added missing RENDERABLE_TYPE bits to EGL mode selection. This is required by the OpenGL ES spec. --- Source/OpenTK/Platform/Egl/EglGraphicsMode.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/OpenTK/Platform/Egl/EglGraphicsMode.cs b/Source/OpenTK/Platform/Egl/EglGraphicsMode.cs index 32df2ef3..d14aee8c 100644 --- a/Source/OpenTK/Platform/Egl/EglGraphicsMode.cs +++ b/Source/OpenTK/Platform/Egl/EglGraphicsMode.cs @@ -43,6 +43,14 @@ namespace OpenTK.Platform.Egl { //Egl.SURFACE_TYPE, Egl.WINDOW_BIT, + // Context creation will fail unless one of these bits is set. Hopefully, setting all bits will not + // cause any ugly side-effects. + // If this doesn't work, we'll have to use Egl.GetConfigs and implement our own selection logic, + // because we the exact ES version is not known when selecting a graphics context. + // (See WinGraphicsMode.cs for an selection logic implementation). + // Todo: add Egl.OPENVG_BIT here if we ever add OpenVG bindings. + Egl.RENDERABLE_TYPE, Egl.OPENGL_ES_BIT | Egl.OPENGL_ES2_BIT | Egl.OPENGL_BIT, + Egl.RED_SIZE, color.Red, Egl.GREEN_SIZE, color.Green, Egl.BLUE_SIZE, color.Blue,