# HG changeset patch # User Sam Lantinga # Date 1258261083 0 # Node ID c8fbb27627d90a8c5ba179591cd180c5bb4770a2 # Parent baeff5f3203b26ca58da29716bf81baab4719a98 Work in progress on OpenGL ReadPixels/WritePixels interface diff -r baeff5f3203b -r c8fbb27627d9 src/video/SDL_renderer_gl.c --- a/src/video/SDL_renderer_gl.c Wed Nov 11 06:34:33 2009 +0000 +++ b/src/video/SDL_renderer_gl.c Sun Nov 15 04:58:03 2009 +0000 @@ -102,7 +102,10 @@ static int GL_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); static int GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect); - +static int GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, + void * pixels, int pitch); +static int GL_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, + const void * pixels, int pitch); static void GL_RenderPresent(SDL_Renderer * renderer); static void GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture); static void GL_DestroyRenderer(SDL_Renderer * renderer); @@ -312,6 +315,8 @@ renderer->RenderLine = GL_RenderLine; renderer->RenderFill = GL_RenderFill; renderer->RenderCopy = GL_RenderCopy; + renderer->RenderReadPixels = GL_RenderReadPixels; + renderer->RenderWritePixels = GL_RenderWritePixels; renderer->RenderPresent = GL_RenderPresent; renderer->DestroyTexture = GL_DestroyTexture; renderer->DestroyRenderer = GL_DestroyRenderer; @@ -1235,6 +1240,19 @@ return 0; } +static int +GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, + void * pixels, int pitch) +{ + //glReadPixels(rect->x, rect->y+rect->h-1, rect->w, rect->h, +} + +static int +GL_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, + const void * pixels, int pitch) +{ +} + static void GL_RenderPresent(SDL_Renderer * renderer) {