OpenGL ES 2 broken in trunk without OpenGL ES 1.1 . headers present(with patch)

Hi!

Sorry for bothering you again.

This one on mainstream SDL again. I need GLES2 context from SDL but I
haven’t installed GLES1.1 on my linux ps(onlu libgles2-mesa-dev) - so no
GLES/gl.h headers.
In this configuration I have following error when running an application
which tries to force creation of gles2 render driver:


#this I print myself
render drivers:
opengles2 14
software 9

#these are SDL errors
ERROR: No OpenGL support in video driver
ERROR: Invalid window

I’m using this code to create renderer:
SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER, “opengles2”,
SDL_HINT_OVERRIDE);
renderer = SDL_CreateRenderer(window, -1, 0);

build SDL like this:
$ cmake -DVIDEO_OPENGL=OFF … && make -j8 && sudo make install

After I altered SDL_config.h.cmake(patch below) and rebuilt SDL and app -
problem gone.

Kerim

diff -r e16c832f0deb include/SDL_config.h.cmake
— a/include/SDL_config.h.cmake Thu Aug 22 14:45:47 2013 +0400
+++ b/include/SDL_config.h.cmake Thu Aug 22 17:36:35 2013 +0400
@@ -289,6 +289,7 @@
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
#cmakedefine SDL_VIDEO_OPENGL_EGL @SDL_VIDEO_OPENGL_EGL@
#cmakedefine SDL_VIDEO_OPENGL_ES @SDL_VIDEO_OPENGL_ES@
+#cmakedefine SDL_VIDEO_OPENGL_ES2 @SDL_VIDEO_OPENGL_ES2@
#cmakedefine SDL_VIDEO_OPENGL_BGL @SDL_VIDEO_OPENGL_BGL@
#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@
#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@

After I altered SDL_config.h.cmake(patch below) and rebuilt SDL and app

  • problem gone.

This is fixed now, in http://hg.libsdl.org/SDL/rev/00042bf02d17

Thanks!

–ryan.