title: Displaying texture in android using OPENGL ES 2.0 AND SDL 2.0 in c(native code)
body: <p>I am trying to display texture in android screen using OPENGL ES 2.0 library along with SDL 2.0.Since i am getting frames from ffmpeg,it was suggested that using OPENGL library we can reduce the delay during texture updation.Now i am having my frames ready to update the screen.So can anyone tell me how to display those raw frames from ffmpeg to android display?Here is my sample code where i got problem,i don't know how to proceed after this.</p>
  
  <pre><code>SDL_Window  *screen=0;
  SDL_GLContext   maincontext=0;
  SDL_Surface *image=NULL;
  if (SDL_Init(SDL_INIT_EVERYTHING)) {
      LOGD( "Could not initialize SDL - %s\n", SDL_GetError());
      SDL_Quit();
      exit(1);
  }
  LOGD(" SDL Initialized..");
  //OPENGL intialization:-
  SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
  SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION,3);
  SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION,0);
  SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,1);
  SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE,24);
  SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL,1);
  //SDL_GL_SetAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT,0);
  
  screen =    SDL_CreateWindow("Window",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,0,0,SDL_WINDOW_FULLSCREEN|SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
  LOGD("SDL Screen Created ..");
  
  //image=SDL_LoadBMP("img.bmp");
  maincontext=SDL_GL_CreateContext(screen);
  /* Clear our buffer with a red background */
      glViewport(0,0,240,240);
  glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
  </code></pre>