Create opengles 1.1 and 2.0 context on android


I’ve noticed SDL “Try to create an OpenGL ES 2.0 context on Android and successfully fall back to OpenGL ES 1.1 if that fails”, from file revisions of .

I tried the code in initEGL from in my app,

but i got “Make sure the SurfaceView or associated SurfaceHolder has a valid Surface” when calling eglCreateWindowSurface.