OpenGL ES 2.0 rendering LIVES!
authorSam Lantinga <slouken@libsdl.org>
Sun, 06 Feb 2011 19:12:55 -0800
changeset 521325ad4a50d34f
parent 5212 7b6101f3ea58
child 5214 b0797947dd1c
OpenGL ES 2.0 rendering LIVES!
Xcode-iPhoneOS/Demos/src/happy.c
src/render/opengles2/SDL_render_gles2.c
     1.1 --- a/Xcode-iPhoneOS/Demos/src/happy.c	Sun Feb 06 10:59:37 2011 -0800
     1.2 +++ b/Xcode-iPhoneOS/Demos/src/happy.c	Sun Feb 06 19:12:55 2011 -0800
     1.3 @@ -139,8 +139,6 @@
     1.4                                  SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
     1.5                                  SDL_WINDOW_BORDERLESS);
     1.6  
     1.7 -    //SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2");
     1.8 -	
     1.9      renderer = SDL_CreateRenderer(window, -1, 0);
    1.10  
    1.11      initializeTexture(renderer);
    1.12 @@ -166,7 +164,7 @@
    1.13          } else if (delay > MILLESECONDS_PER_FRAME) {
    1.14              delay = MILLESECONDS_PER_FRAME;
    1.15          }
    1.16 -        SDL_Delay(delay);
    1.17 +        //SDL_Delay(delay);
    1.18      }
    1.19  
    1.20      /* cleanup */
     2.1 --- a/src/render/opengles2/SDL_render_gles2.c	Sun Feb 06 10:59:37 2011 -0800
     2.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Sun Feb 06 19:12:55 2011 -0800
     2.3 @@ -786,7 +786,6 @@
     2.4  static int GLES2_RenderClear(SDL_Renderer *renderer);
     2.5  static int GLES2_RenderDrawPoints(SDL_Renderer *renderer, const SDL_Point *points, int count);
     2.6  static int GLES2_RenderDrawLines(SDL_Renderer *renderer, const SDL_Point *points, int count);
     2.7 -static int GLES2_RenderDrawRects(SDL_Renderer *renderer, const SDL_Rect **rects, int count);
     2.8  static int GLES2_RenderFillRects(SDL_Renderer *renderer, const SDL_Rect **rects, int count);
     2.9  static int GLES2_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect,
    2.10                              const SDL_Rect *dstrect);
    2.11 @@ -1174,6 +1173,8 @@
    2.12      if (hasCompiler)
    2.13          rdata->shader_formats[nFormats - 1] = (GLenum)-1;
    2.14  #endif /* ZUNE_HD */
    2.15 +	
    2.16 +    rdata->updateSize = SDL_TRUE;
    2.17  
    2.18      /* Populate the function pointers for the module */
    2.19      renderer->WindowEvent         = &GLES2_WindowEvent;