Mercurial > sdl-ios-xcode
comparison src/video/SDL_renderer_gles.c @ 5152:be02be2ea897
Making the API simpler, removed support for palettized video modes and textures.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 01 Feb 2011 21:23:43 -0800 |
parents | 5429daf5e3f9 |
children | 1435f8a6425c |
comparison
equal
deleted
inserted
replaced
5151:5429daf5e3f9 | 5152:be02be2ea897 |
---|---|
58 const SDL_WindowEvent *event); | 58 const SDL_WindowEvent *event); |
59 static int GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture); | 59 static int GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture); |
60 static int GLES_QueryTexturePixels(SDL_Renderer * renderer, | 60 static int GLES_QueryTexturePixels(SDL_Renderer * renderer, |
61 SDL_Texture * texture, void **pixels, | 61 SDL_Texture * texture, void **pixels, |
62 int *pitch); | 62 int *pitch); |
63 static int GLES_SetTexturePalette(SDL_Renderer * renderer, | |
64 SDL_Texture * texture, | |
65 const SDL_Color * colors, int firstcolor, | |
66 int ncolors); | |
67 static int GLES_GetTexturePalette(SDL_Renderer * renderer, | |
68 SDL_Texture * texture, SDL_Color * colors, | |
69 int firstcolor, int ncolors); | |
70 static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 63 static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
71 const SDL_Rect * rect, const void *pixels, | 64 const SDL_Rect * rect, const void *pixels, |
72 int pitch); | 65 int pitch); |
73 static int GLES_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 66 static int GLES_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
74 const SDL_Rect * rect, int markDirty, | 67 const SDL_Rect * rect, int markDirty, |
217 } | 210 } |
218 | 211 |
219 renderer->WindowEvent = GLES_WindowEvent; | 212 renderer->WindowEvent = GLES_WindowEvent; |
220 renderer->CreateTexture = GLES_CreateTexture; | 213 renderer->CreateTexture = GLES_CreateTexture; |
221 renderer->QueryTexturePixels = GLES_QueryTexturePixels; | 214 renderer->QueryTexturePixels = GLES_QueryTexturePixels; |
222 renderer->SetTexturePalette = GLES_SetTexturePalette; | |
223 renderer->GetTexturePalette = GLES_GetTexturePalette; | |
224 renderer->UpdateTexture = GLES_UpdateTexture; | 215 renderer->UpdateTexture = GLES_UpdateTexture; |
225 renderer->LockTexture = GLES_LockTexture; | 216 renderer->LockTexture = GLES_LockTexture; |
226 renderer->UnlockTexture = GLES_UnlockTexture; | 217 renderer->UnlockTexture = GLES_UnlockTexture; |
227 renderer->DirtyTexture = GLES_DirtyTexture; | 218 renderer->DirtyTexture = GLES_DirtyTexture; |
228 renderer->RenderDrawPoints = GLES_RenderDrawPoints; | 219 renderer->RenderDrawPoints = GLES_RenderDrawPoints; |
463 GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; | 454 GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; |
464 | 455 |
465 *pixels = data->pixels; | 456 *pixels = data->pixels; |
466 *pitch = data->pitch; | 457 *pitch = data->pitch; |
467 return 0; | 458 return 0; |
468 } | |
469 | |
470 static int | |
471 GLES_SetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, | |
472 const SDL_Color * colors, int firstcolor, int ncolors) | |
473 { | |
474 SDL_SetError("OpenGL ES does not support paletted textures"); | |
475 return -1; | |
476 } | |
477 | |
478 static int | |
479 GLES_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, | |
480 SDL_Color * colors, int firstcolor, int ncolors) | |
481 { | |
482 SDL_SetError("OpenGL ES does not support paletted textures"); | |
483 return -1; | |
484 } | 459 } |
485 | 460 |
486 static void | 461 static void |
487 SetupTextureUpdate(GLES_RenderData * renderdata, SDL_Texture * texture, | 462 SetupTextureUpdate(GLES_RenderData * renderdata, SDL_Texture * texture, |
488 int pitch) | 463 int pitch) |