comparison src/video/SDL_renderer_sw.c @ 2927:2133d2d300fd

SetDrawColor() and SetDrawBlendMode() are optional
author Sam Lantinga <slouken@libsdl.org>
date Tue, 30 Dec 2008 07:14:11 +0000
parents d214e791c77c
children aa34d1180d30
comparison
equal deleted inserted replaced
2926:27f2b5e7e899 2927:2133d2d300fd
57 int pitch); 57 int pitch);
58 static int SW_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, 58 static int SW_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
59 const SDL_Rect * rect, int markDirty, void **pixels, 59 const SDL_Rect * rect, int markDirty, void **pixels,
60 int *pitch); 60 int *pitch);
61 static void SW_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); 61 static void SW_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
62 static int SW_SetDrawColor(SDL_Renderer * renderer);
63 static int SW_SetDrawBlendMode(SDL_Renderer * renderer);
64 static int SW_RenderPoint(SDL_Renderer * renderer, int x, int y); 62 static int SW_RenderPoint(SDL_Renderer * renderer, int x, int y);
65 static int SW_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, 63 static int SW_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2,
66 int y2); 64 int y2);
67 static int SW_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); 65 static int SW_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
68 static int SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, 66 static int SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
224 return NULL; 222 return NULL;
225 } 223 }
226 renderer->ActivateRenderer = SW_ActivateRenderer; 224 renderer->ActivateRenderer = SW_ActivateRenderer;
227 renderer->DisplayModeChanged = SW_DisplayModeChanged; 225 renderer->DisplayModeChanged = SW_DisplayModeChanged;
228 226
229 renderer->SetDrawColor = SW_SetDrawColor;
230 renderer->SetDrawBlendMode = SW_SetDrawBlendMode;
231 renderer->RenderPoint = SW_RenderPoint; 227 renderer->RenderPoint = SW_RenderPoint;
232 renderer->RenderLine = SW_RenderLine; 228 renderer->RenderLine = SW_RenderLine;
233 renderer->RenderFill = SW_RenderFill; 229 renderer->RenderFill = SW_RenderFill;
234 renderer->RenderCopy = SW_RenderCopy; 230 renderer->RenderCopy = SW_RenderCopy;
235 renderer->RenderPresent = SW_RenderPresent; 231 renderer->RenderPresent = SW_RenderPresent;
527 SDL_SW_UnlockYUVTexture((SDL_SW_YUVTexture *) texture->driverdata); 523 SDL_SW_UnlockYUVTexture((SDL_SW_YUVTexture *) texture->driverdata);
528 } 524 }
529 } 525 }
530 526
531 static int 527 static int
532 SW_SetDrawColor(SDL_Renderer * renderer)
533 {
534 return 0;
535 }
536
537 static int
538 SW_SetDrawBlendMode(SDL_Renderer * renderer)
539 {
540 return 0;
541 }
542
543 static int
544 SW_RenderPoint(SDL_Renderer * renderer, int x, int y) 528 SW_RenderPoint(SDL_Renderer * renderer, int x, int y)
545 { 529 {
546 SW_RenderData *data = (SW_RenderData *) renderer->driverdata; 530 SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
547 SDL_Rect rect; 531 SDL_Rect rect;
548 int status; 532 int status;