Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
OpenGL ES 2.0 rendering LIVES!
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 7, 2011
1 parent a7f806b commit 03c72e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Xcode-iPhoneOS/Demos/src/happy.c
Expand Up @@ -139,8 +139,6 @@ main(int argc, char *argv[])
SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
SDL_WINDOW_BORDERLESS);

//SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2");

renderer = SDL_CreateRenderer(window, -1, 0);

initializeTexture(renderer);
Expand All @@ -166,7 +164,7 @@ main(int argc, char *argv[])
} else if (delay > MILLESECONDS_PER_FRAME) {
delay = MILLESECONDS_PER_FRAME;
}
SDL_Delay(delay);
//SDL_Delay(delay);
}

/* cleanup */
Expand Down
3 changes: 2 additions & 1 deletion src/render/opengles2/SDL_render_gles2.c
Expand Up @@ -786,7 +786,6 @@ GLES2_SetOrthographicProjection(SDL_Renderer *renderer)
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);
Expand Down Expand Up @@ -1174,6 +1173,8 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
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;
Expand Down

0 comments on commit 03c72e7

Please sign in to comment.