The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Android: libEGL called unimplemented OpenGL ES API
SparkyNZ


Joined: 02 Nov 2010
Posts: 72
When I run my SDL2 Android app, my logcat floods with "libEGL called unimplemented OpenGL ES API errors". All of the search results I have found so far (including the 1 post in this forum) have suggested not using GLES2.0 and defaulting to GLES 1.1 instead. This isn't a solution - I am using GLES2.0 - I was forced into moving from 1.1 to 2.0.

So what causes this annoying error exactly?

My SDL setup is as follows:
Code:

  SDL_SetHint( SDL_HINT_RENDER_DRIVER, "opengles2") ;
  SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES );
  SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 2 );
  SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 0 );
  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
  SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
  SDL_GL_SetAttribute( SDL_GL_RED_SIZE,     8 );
  SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE,   8 );
  SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE,    8 );
  SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE,   8 );
  SDL_GL_SetAttribute( SDL_GL_BUFFER_SIZE, 32 );
  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE,  24 );

  g_SDLWindow = SDL_CreateWindow( "Train Tracker",
                                 SDL_WINDOWPOS_UNDEFINED,
                                 nWindowPosY,
                                 g_ScreenWidth,
                                 g_ScreenHeight,
                                 SDL_WINDOW_OPENGL );
 
  SDL_GL_CreateContext( g_SDLWindow );


I did have to rewrite my immediate-mode OpenGL code to use shaders instead. Could it be that I have an old immediate-mode call still which would result in this error?

I'm about to start the incremental task of slowly disabling all of my drawing to see at what point this error appears.. Hoping there is a simple answer for this one.
Re: Android: libEGL called unimplemented OpenGL ES API
SparkyNZ


Joined: 02 Nov 2010
Posts: 72
SparkyNZ wrote:
So what causes this annoying error exactly?

I did have to rewrite my immediate-mode OpenGL code to use shaders instead. Could it be that I have an old immediate-mode call still which would result in this error?


"Yes" was the answer to my second question. I had glColor4f() calls still in my code - immediate mode calls - and these were the cause of the errors.