src/render/opengles/SDL_render_gles.c
changeset 6190 519380462400
parent 6188 e82023802002
child 6232 37e8d0736366
     1.1 --- a/src/render/opengles/SDL_render_gles.c	Fri Aug 26 13:23:40 2011 +0100
     1.2 +++ b/src/render/opengles/SDL_render_gles.c	Sun Jan 08 13:31:22 2012 -0500
     1.3 @@ -40,7 +40,7 @@
     1.4  
     1.5  /* OpenGL ES 1.1 renderer implementation, based on the OpenGL renderer */
     1.6  
     1.7 -/* Used to re-create the window with OpenGL capability */
     1.8 +/* Used to re-create the window with OpenGL ES capability */
     1.9  extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
    1.10  
    1.11  static const float inv255f = 1.0f / 255.0f;
    1.12 @@ -151,6 +151,14 @@
    1.13  
    1.14  static int GLES_LoadFunctions(GLES_RenderData * data)
    1.15  {
    1.16 +#if SDL_VIDEO_DRIVER_UIKIT
    1.17 +#define __SDL_NOGETPROCADDR__
    1.18 +#elif SDL_VIDEO_DRIVER_ANDROID
    1.19 +#define __SDL_NOGETPROCADDR__
    1.20 +#elif SDL_VIDEO_DRIVER_PANDORA
    1.21 +#define __SDL_NOGETPROCADDR__
    1.22 +#endif
    1.23 +
    1.24  #ifdef __SDL_NOGETPROCADDR__
    1.25  #define SDL_PROC(ret,func,params) data->func=func;
    1.26  #else
    1.27 @@ -318,6 +326,8 @@
    1.28  static void
    1.29  GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
    1.30  {
    1.31 +    GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
    1.32 +    
    1.33      if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) {
    1.34          /* Rebind the context to the window area and update matrices */
    1.35          SDL_CurrentContext = NULL;
    1.36 @@ -325,7 +335,7 @@
    1.37  
    1.38      if (event->event == SDL_WINDOWEVENT_MINIMIZED) {
    1.39          /* According to Apple documentation, we need to finish drawing NOW! */
    1.40 -	glFinish();
    1.41 +	data->glFinish();
    1.42      }
    1.43  }
    1.44