comparison src/video/x11/SDL_x11render.c @ 2927:2133d2d300fd

SetDrawColor() and SetDrawBlendMode() are optional
author Sam Lantinga <slouken@libsdl.org>
date Tue, 30 Dec 2008 07:14:11 +0000
parents ffdd533f7add
children e4a469d6ddab
comparison
equal deleted inserted replaced
2926:27f2b5e7e899 2927:2133d2d300fd
45 int pitch); 45 int pitch);
46 static int X11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, 46 static int X11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
47 const SDL_Rect * rect, int markDirty, 47 const SDL_Rect * rect, int markDirty,
48 void **pixels, int *pitch); 48 void **pixels, int *pitch);
49 static void X11_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); 49 static void X11_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
50 static int X11_SetDrawColor(SDL_Renderer * renderer);
51 static int X11_SetDrawBlendMode(SDL_Renderer * renderer); 50 static int X11_SetDrawBlendMode(SDL_Renderer * renderer);
52 static int X11_RenderPoint(SDL_Renderer * renderer, int x, int y); 51 static int X11_RenderPoint(SDL_Renderer * renderer, int x, int y);
53 static int X11_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, 52 static int X11_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2,
54 int y2); 53 int y2);
55 static int X11_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); 54 static int X11_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
195 renderer->SetTextureBlendMode = X11_SetTextureBlendMode; 194 renderer->SetTextureBlendMode = X11_SetTextureBlendMode;
196 renderer->SetTextureScaleMode = X11_SetTextureScaleMode; 195 renderer->SetTextureScaleMode = X11_SetTextureScaleMode;
197 renderer->UpdateTexture = X11_UpdateTexture; 196 renderer->UpdateTexture = X11_UpdateTexture;
198 renderer->LockTexture = X11_LockTexture; 197 renderer->LockTexture = X11_LockTexture;
199 renderer->UnlockTexture = X11_UnlockTexture; 198 renderer->UnlockTexture = X11_UnlockTexture;
200 renderer->SetDrawColor = X11_SetDrawColor;
201 renderer->SetDrawBlendMode = X11_SetDrawBlendMode; 199 renderer->SetDrawBlendMode = X11_SetDrawBlendMode;
202 renderer->RenderPoint = X11_RenderPoint; 200 renderer->RenderPoint = X11_RenderPoint;
203 renderer->RenderLine = X11_RenderLine; 201 renderer->RenderLine = X11_RenderLine;
204 renderer->RenderFill = X11_RenderFill; 202 renderer->RenderFill = X11_RenderFill;
205 renderer->RenderCopy = X11_RenderCopy; 203 renderer->RenderCopy = X11_RenderCopy;
562 UpdateYUVTextureData(texture); 560 UpdateYUVTextureData(texture);
563 } 561 }
564 } 562 }
565 563
566 static int 564 static int
567 X11_SetDrawColor(SDL_Renderer * renderer)
568 {
569 return 0;
570 }
571
572 static int
573 X11_SetDrawBlendMode(SDL_Renderer * renderer) 565 X11_SetDrawBlendMode(SDL_Renderer * renderer)
574 { 566 {
575 switch (renderer->blendMode) { 567 switch (renderer->blendMode) {
576 case SDL_BLENDMODE_NONE: 568 case SDL_BLENDMODE_NONE:
577 return 0; 569 return 0;