comparison src/video/nds/SDL_ndsrender.c @ 2810:27cb878a278e

Implemented the X11 (non-OpenGL) renderer, no alpha or scaling available.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 30 Nov 2008 21:58:23 +0000
parents 204be4fc2726
children 99210400e8b9
comparison
equal deleted inserted replaced
2809:7e257c3a3bf0 2810:27cb878a278e
122 int pitch); 122 int pitch);
123 static int NDS_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, 123 static int NDS_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
124 const SDL_Rect * rect, int markDirty, 124 const SDL_Rect * rect, int markDirty,
125 void **pixels, int *pitch); 125 void **pixels, int *pitch);
126 static void NDS_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); 126 static void NDS_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
127 static void NDS_DirtyTexture(SDL_Renderer * renderer,
128 SDL_Texture * texture, int numrects,
129 const SDL_Rect * rects);
130 static int NDS_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, 127 static int NDS_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g,
131 Uint8 b, Uint8 a, const SDL_Rect * rect); 128 Uint8 b, Uint8 a, const SDL_Rect * rect);
132 static int NDS_RenderCopy(SDL_Renderer * renderer, 129 static int NDS_RenderCopy(SDL_Renderer * renderer,
133 SDL_Texture * texture, 130 SDL_Texture * texture,
134 const SDL_Rect * srcrect, const SDL_Rect * dstrect); 131 const SDL_Rect * srcrect, const SDL_Rect * dstrect);
244 renderer->SetTextureBlendMode = NDS_SetTextureBlendMode; 241 renderer->SetTextureBlendMode = NDS_SetTextureBlendMode;
245 renderer->SetTextureScaleMode = NDS_SetTextureScaleMode; 242 renderer->SetTextureScaleMode = NDS_SetTextureScaleMode;
246 renderer->UpdateTexture = NDS_UpdateTexture; 243 renderer->UpdateTexture = NDS_UpdateTexture;
247 renderer->LockTexture = NDS_LockTexture; 244 renderer->LockTexture = NDS_LockTexture;
248 renderer->UnlockTexture = NDS_UnlockTexture; 245 renderer->UnlockTexture = NDS_UnlockTexture;
249 renderer->DirtyTexture = NDS_DirtyTexture;
250 renderer->DestroyTexture = NDS_DestroyTexture; 246 renderer->DestroyTexture = NDS_DestroyTexture;
251 247
252 renderer->info.mod_modes = NDS_RenderDriver.info.mod_modes; 248 renderer->info.mod_modes = NDS_RenderDriver.info.mod_modes;
253 renderer->info.blend_modes = NDS_RenderDriver.info.blend_modes; 249 renderer->info.blend_modes = NDS_RenderDriver.info.blend_modes;
254 renderer->info.scale_modes = NDS_RenderDriver.info.scale_modes; 250 renderer->info.scale_modes = NDS_RenderDriver.info.scale_modes;
497 NDS_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) 493 NDS_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
498 { 494 {
499 /* stub! */ 495 /* stub! */
500 } 496 }
501 497
502 static void
503 NDS_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
504 int numrects, const SDL_Rect * rects)
505 {
506 /* stub! */
507 }
508
509 static int 498 static int
510 NDS_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, 499 NDS_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
511 Uint8 a, const SDL_Rect * rect) 500 Uint8 a, const SDL_Rect * rect)
512 { 501 {
513 NDS_RenderData *data = (NDS_RenderData *) renderer->driverdata; 502 NDS_RenderData *data = (NDS_RenderData *) renderer->driverdata;