Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_render.c @ 2901:133601e3b255
Added RenderPiont() API
Merged the drawing tests into a single test program
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 21 Dec 2008 17:39:41 +0000 |
parents | 9dde605c7540 |
children | 2133d2d300fd |
comparison
equal
deleted
inserted
replaced
2900:3a9636c83849 | 2901:133601e3b255 |
---|---|
71 static void DirectFB_DirtyTexture(SDL_Renderer * renderer, | 71 static void DirectFB_DirtyTexture(SDL_Renderer * renderer, |
72 SDL_Texture * texture, int numrects, | 72 SDL_Texture * texture, int numrects, |
73 const SDL_Rect * rects); | 73 const SDL_Rect * rects); |
74 static int DirectFB_SetDrawColor(SDL_Renderer * renderer); | 74 static int DirectFB_SetDrawColor(SDL_Renderer * renderer); |
75 static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer); | 75 static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer); |
76 static int DirectFB_RenderPoint(SDL_Renderer * renderer, int x, int y); | |
76 static int DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, | 77 static int DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, |
77 int x2, int y2); | 78 int x2, int y2); |
78 static int DirectFB_RenderFill(SDL_Renderer * renderer, | 79 static int DirectFB_RenderFill(SDL_Renderer * renderer, |
79 const SDL_Rect * rect); | 80 const SDL_Rect * rect); |
80 static int DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, | 81 static int DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, |
293 renderer->LockTexture = DirectFB_LockTexture; | 294 renderer->LockTexture = DirectFB_LockTexture; |
294 renderer->UnlockTexture = DirectFB_UnlockTexture; | 295 renderer->UnlockTexture = DirectFB_UnlockTexture; |
295 renderer->DirtyTexture = DirectFB_DirtyTexture; | 296 renderer->DirtyTexture = DirectFB_DirtyTexture; |
296 renderer->SetDrawColor = DirectFB_SetDrawColor; | 297 renderer->SetDrawColor = DirectFB_SetDrawColor; |
297 renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode; | 298 renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode; |
299 renderer->RenderPoint = DirectFB_RenderPoint; | |
298 renderer->RenderLine = DirectFB_RenderLine; | 300 renderer->RenderLine = DirectFB_RenderLine; |
299 renderer->RenderFill = DirectFB_RenderFill; | 301 renderer->RenderFill = DirectFB_RenderFill; |
300 renderer->RenderCopy = DirectFB_RenderCopy; | 302 renderer->RenderCopy = DirectFB_RenderCopy; |
301 renderer->RenderPresent = DirectFB_RenderPresent; | 303 renderer->RenderPresent = DirectFB_RenderPresent; |
302 renderer->DestroyTexture = DirectFB_DestroyTexture; | 304 renderer->DestroyTexture = DirectFB_DestroyTexture; |
842 error: | 844 error: |
843 return -1; | 845 return -1; |
844 } | 846 } |
845 | 847 |
846 static int | 848 static int |
849 DirectFB_RenderPoint(SDL_Renderer * renderer, int x, int y) | |
850 { | |
851 DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; | |
852 DFBResult ret; | |
853 | |
854 PrepareDraw(renderer); | |
855 SDL_DFB_CHECKERR(data->surface->DrawPoint(data->surface, x, y)); | |
856 return 0; | |
857 error: | |
858 return -1; | |
859 } | |
860 | |
861 static int | |
847 DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) | 862 DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) |
848 { | 863 { |
849 DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; | 864 DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; |
850 DFBResult ret; | 865 DFBResult ret; |
851 | 866 |