Guest User

Untitled

a guest
Oct 28th, 2011
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SDL_Init(SDL_INIT_VIDEO);
  2. SDL_GLES_Init(SDL_GLES_VERSION_2_0);
  3. SDL_GLES_SetAttribute(SDL_GLES_RED_SIZE, RSIZE);
  4. SDL_GLES_SetAttribute(SDL_GLES_GREEN_SIZE, GSIZE);
  5. SDL_GLES_SetAttribute(SDL_GLES_BLUE_SIZE, BSIZE);
  6. SDL_GLES_SetAttribute(SDL_GLES_ALPHA_SIZE, ASIZE);
  7. SDL_SetVideoMode(0, 0, 16, SDL_SWSURFACE|SDL_FULLSCREEN);
  8. m_SDLGLEScontext = SDL_GLES_CreateContext();
  9. if (m_SDLGLEScontext == NULL)
  10. {
  11. CLog::Log(LOGFATAL, "SDL_GLES_CreateContext failed: %s", SDL_GetError());
  12. return false;
  13. }
  14. if (SDL_GLES_MakeCurrent(m_SDLGLEScontext) != 0)
  15. {
  16. CLog::Log(LOGFATAL, "SDL_GLES_MakeCurrent failed: %s", SDL_GetError());
  17. return false;
  18. }
  19.  
RAW Paste Data