Mercurial > sdl-ios-xcode
comparison src/video/SDL_renderer_gl.c @ 3431:c8fbb27627d9
Work in progress on OpenGL ReadPixels/WritePixels interface
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 15 Nov 2009 04:58:03 +0000 |
parents | fe2f10481878 |
children | ad845d9835aa |
comparison
equal
deleted
inserted
replaced
3430:baeff5f3203b | 3431:c8fbb27627d9 |
---|---|
100 static int GL_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, | 100 static int GL_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, |
101 int y2); | 101 int y2); |
102 static int GL_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); | 102 static int GL_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); |
103 static int GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, | 103 static int GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, |
104 const SDL_Rect * srcrect, const SDL_Rect * dstrect); | 104 const SDL_Rect * srcrect, const SDL_Rect * dstrect); |
105 | 105 static int GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, |
106 void * pixels, int pitch); | |
107 static int GL_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, | |
108 const void * pixels, int pitch); | |
106 static void GL_RenderPresent(SDL_Renderer * renderer); | 109 static void GL_RenderPresent(SDL_Renderer * renderer); |
107 static void GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture); | 110 static void GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture); |
108 static void GL_DestroyRenderer(SDL_Renderer * renderer); | 111 static void GL_DestroyRenderer(SDL_Renderer * renderer); |
109 | 112 |
110 | 113 |
310 renderer->DirtyTexture = GL_DirtyTexture; | 313 renderer->DirtyTexture = GL_DirtyTexture; |
311 renderer->RenderPoint = GL_RenderPoint; | 314 renderer->RenderPoint = GL_RenderPoint; |
312 renderer->RenderLine = GL_RenderLine; | 315 renderer->RenderLine = GL_RenderLine; |
313 renderer->RenderFill = GL_RenderFill; | 316 renderer->RenderFill = GL_RenderFill; |
314 renderer->RenderCopy = GL_RenderCopy; | 317 renderer->RenderCopy = GL_RenderCopy; |
318 renderer->RenderReadPixels = GL_RenderReadPixels; | |
319 renderer->RenderWritePixels = GL_RenderWritePixels; | |
315 renderer->RenderPresent = GL_RenderPresent; | 320 renderer->RenderPresent = GL_RenderPresent; |
316 renderer->DestroyTexture = GL_DestroyTexture; | 321 renderer->DestroyTexture = GL_DestroyTexture; |
317 renderer->DestroyRenderer = GL_DestroyRenderer; | 322 renderer->DestroyRenderer = GL_DestroyRenderer; |
318 renderer->info = GL_RenderDriver.info; | 323 renderer->info = GL_RenderDriver.info; |
319 renderer->window = window->id; | 324 renderer->window = window->id; |
1233 data->glDisable(texturedata->type); | 1238 data->glDisable(texturedata->type); |
1234 | 1239 |
1235 return 0; | 1240 return 0; |
1236 } | 1241 } |
1237 | 1242 |
1243 static int | |
1244 GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, | |
1245 void * pixels, int pitch) | |
1246 { | |
1247 //glReadPixels(rect->x, rect->y+rect->h-1, rect->w, rect->h, | |
1248 } | |
1249 | |
1250 static int | |
1251 GL_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, | |
1252 const void * pixels, int pitch) | |
1253 { | |
1254 } | |
1255 | |
1238 static void | 1256 static void |
1239 GL_RenderPresent(SDL_Renderer * renderer) | 1257 GL_RenderPresent(SDL_Renderer * renderer) |
1240 { | 1258 { |
1241 SDL_GL_SwapWindow(renderer->window); | 1259 SDL_GL_SwapWindow(renderer->window); |
1242 } | 1260 } |