changeset 5216:25ad4a50d34f

OpenGL ES 2.0 rendering LIVES!
author Sam Lantinga <slouken@libsdl.org>
date Sun, 06 Feb 2011 19:12:55 -0800
parents 7b6101f3ea58
children b0797947dd1c
files Xcode-iPhoneOS/Demos/src/happy.c src/render/opengles2/SDL_render_gles2.c
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Xcode-iPhoneOS/Demos/src/happy.c	Sun Feb 06 10:59:37 2011 -0800
+++ b/Xcode-iPhoneOS/Demos/src/happy.c	Sun Feb 06 19:12:55 2011 -0800
@@ -139,8 +139,6 @@
                                 SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
                                 SDL_WINDOW_BORDERLESS);
 
-    //SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2");
-	
     renderer = SDL_CreateRenderer(window, -1, 0);
 
     initializeTexture(renderer);
@@ -166,7 +164,7 @@
         } else if (delay > MILLESECONDS_PER_FRAME) {
             delay = MILLESECONDS_PER_FRAME;
         }
-        SDL_Delay(delay);
+        //SDL_Delay(delay);
     }
 
     /* cleanup */
--- a/src/render/opengles2/SDL_render_gles2.c	Sun Feb 06 10:59:37 2011 -0800
+++ b/src/render/opengles2/SDL_render_gles2.c	Sun Feb 06 19:12:55 2011 -0800
@@ -786,7 +786,6 @@
 static int GLES2_RenderClear(SDL_Renderer *renderer);
 static int GLES2_RenderDrawPoints(SDL_Renderer *renderer, const SDL_Point *points, int count);
 static int GLES2_RenderDrawLines(SDL_Renderer *renderer, const SDL_Point *points, int count);
-static int GLES2_RenderDrawRects(SDL_Renderer *renderer, const SDL_Rect **rects, int count);
 static int GLES2_RenderFillRects(SDL_Renderer *renderer, const SDL_Rect **rects, int count);
 static int GLES2_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect,
                             const SDL_Rect *dstrect);
@@ -1174,6 +1173,8 @@
     if (hasCompiler)
         rdata->shader_formats[nFormats - 1] = (GLenum)-1;
 #endif /* ZUNE_HD */
+	
+    rdata->updateSize = SDL_TRUE;
 
     /* Populate the function pointers for the module */
     renderer->WindowEvent         = &GLES2_WindowEvent;