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

SetDrawColor() and SetDrawBlendMode() are optional
author Sam Lantinga <slouken@libsdl.org>
date Tue, 30 Dec 2008 07:14:11 +0000
parents 7e21f7662208
children 066384910f50
comparison
equal deleted inserted replaced
2926:27f2b5e7e899 2927:2133d2d300fd
94 const SDL_Rect * rect, int markDirty, void **pixels, 94 const SDL_Rect * rect, int markDirty, void **pixels,
95 int *pitch); 95 int *pitch);
96 static void GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); 96 static void GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
97 static void GL_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, 97 static void GL_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
98 int numrects, const SDL_Rect * rects); 98 int numrects, const SDL_Rect * rects);
99 static int GL_SetDrawColor(SDL_Renderer * renderer);
100 static int GL_SetDrawBlendMode(SDL_Renderer * renderer);
101 static int GL_RenderPoint(SDL_Renderer * renderer, int x, int y); 99 static int GL_RenderPoint(SDL_Renderer * renderer, int x, int y);
102 static int GL_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, 100 static int GL_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2,
103 int y2); 101 int y2);
104 static int GL_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); 102 static int GL_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
105 static int GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, 103 static int GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
310 renderer->SetTextureScaleMode = GL_SetTextureScaleMode; 308 renderer->SetTextureScaleMode = GL_SetTextureScaleMode;
311 renderer->UpdateTexture = GL_UpdateTexture; 309 renderer->UpdateTexture = GL_UpdateTexture;
312 renderer->LockTexture = GL_LockTexture; 310 renderer->LockTexture = GL_LockTexture;
313 renderer->UnlockTexture = GL_UnlockTexture; 311 renderer->UnlockTexture = GL_UnlockTexture;
314 renderer->DirtyTexture = GL_DirtyTexture; 312 renderer->DirtyTexture = GL_DirtyTexture;
315 renderer->SetDrawColor = GL_SetDrawColor;
316 renderer->SetDrawBlendMode = GL_SetDrawBlendMode;
317 renderer->RenderPoint = GL_RenderPoint; 313 renderer->RenderPoint = GL_RenderPoint;
318 renderer->RenderLine = GL_RenderLine; 314 renderer->RenderLine = GL_RenderLine;
319 renderer->RenderFill = GL_RenderFill; 315 renderer->RenderFill = GL_RenderFill;
320 renderer->RenderCopy = GL_RenderCopy; 316 renderer->RenderCopy = GL_RenderCopy;
321 renderer->RenderPresent = GL_RenderPresent; 317 renderer->RenderPresent = GL_RenderPresent;
1069 SDL_AddDirtyRect(&data->dirty, &rects[i]); 1065 SDL_AddDirtyRect(&data->dirty, &rects[i]);
1070 } 1066 }
1071 } 1067 }
1072 1068
1073 static int 1069 static int
1074 GL_SetDrawColor(SDL_Renderer * renderer)
1075 {
1076 return 0;
1077 }
1078
1079 static int
1080 GL_SetDrawBlendMode(SDL_Renderer * renderer)
1081 {
1082 return 0;
1083 }
1084
1085 static int
1086 GL_RenderPoint(SDL_Renderer * renderer, int x, int y) 1070 GL_RenderPoint(SDL_Renderer * renderer, int x, int y)
1087 { 1071 {
1088 GL_RenderData *data = (GL_RenderData *) renderer->driverdata; 1072 GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
1089 1073
1090 SetBlendMode(data, renderer->blendMode); 1074 SetBlendMode(data, renderer->blendMode);