Mercurial > sdl-ios-xcode
diff 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 |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_render.c Sun Dec 21 08:59:56 2008 +0000 +++ b/src/video/directfb/SDL_DirectFB_render.c Sun Dec 21 17:39:41 2008 +0000 @@ -73,6 +73,7 @@ const SDL_Rect * rects); static int DirectFB_SetDrawColor(SDL_Renderer * renderer); static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer); +static int DirectFB_RenderPoint(SDL_Renderer * renderer, int x, int y); static int DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2); static int DirectFB_RenderFill(SDL_Renderer * renderer, @@ -295,6 +296,7 @@ renderer->DirtyTexture = DirectFB_DirtyTexture; renderer->SetDrawColor = DirectFB_SetDrawColor; renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode; + renderer->RenderPoint = DirectFB_RenderPoint; renderer->RenderLine = DirectFB_RenderLine; renderer->RenderFill = DirectFB_RenderFill; renderer->RenderCopy = DirectFB_RenderCopy; @@ -844,6 +846,19 @@ } static int +DirectFB_RenderPoint(SDL_Renderer * renderer, int x, int y) +{ + DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; + DFBResult ret; + + PrepareDraw(renderer); + SDL_DFB_CHECKERR(data->surface->DrawPoint(data->surface, x, y)); + return 0; + error: + return -1; +} + +static int DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) { DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;