Mercurial > sdl-ios-xcode
comparison src/video/windows/SDL_d3drender.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 |
comparison
equal
deleted
inserted
replaced
5151:5429daf5e3f9 | 5152:be02be2ea897 |
---|---|
92 static int D3D_DisplayModeChanged(SDL_Renderer * renderer); | 92 static int D3D_DisplayModeChanged(SDL_Renderer * renderer); |
93 static int D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture); | 93 static int D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture); |
94 static int D3D_QueryTexturePixels(SDL_Renderer * renderer, | 94 static int D3D_QueryTexturePixels(SDL_Renderer * renderer, |
95 SDL_Texture * texture, void **pixels, | 95 SDL_Texture * texture, void **pixels, |
96 int *pitch); | 96 int *pitch); |
97 static int D3D_SetTexturePalette(SDL_Renderer * renderer, | |
98 SDL_Texture * texture, | |
99 const SDL_Color * colors, int firstcolor, | |
100 int ncolors); | |
101 static int D3D_GetTexturePalette(SDL_Renderer * renderer, | |
102 SDL_Texture * texture, SDL_Color * colors, | |
103 int firstcolor, int ncolors); | |
104 static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 97 static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
105 const SDL_Rect * rect, const void *pixels, | 98 const SDL_Rect * rect, const void *pixels, |
106 int pitch); | 99 int pitch); |
107 static int D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 100 static int D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
108 const SDL_Rect * rect, int markDirty, | 101 const SDL_Rect * rect, int markDirty, |
360 SDL_RendererInfo *info = &D3D_RenderDriver.info; | 353 SDL_RendererInfo *info = &D3D_RenderDriver.info; |
361 | 354 |
362 if (data->d3d) { | 355 if (data->d3d) { |
363 int i, j; | 356 int i, j; |
364 int formats[] = { | 357 int formats[] = { |
365 SDL_PIXELFORMAT_INDEX8, | |
366 SDL_PIXELFORMAT_RGB332, | 358 SDL_PIXELFORMAT_RGB332, |
367 SDL_PIXELFORMAT_RGB444, | 359 SDL_PIXELFORMAT_RGB444, |
368 SDL_PIXELFORMAT_RGB555, | 360 SDL_PIXELFORMAT_RGB555, |
369 SDL_PIXELFORMAT_ARGB4444, | 361 SDL_PIXELFORMAT_ARGB4444, |
370 SDL_PIXELFORMAT_ARGB1555, | 362 SDL_PIXELFORMAT_ARGB1555, |
434 videodata->render = RENDER_D3D; | 426 videodata->render = RENDER_D3D; |
435 | 427 |
436 renderer->DisplayModeChanged = D3D_DisplayModeChanged; | 428 renderer->DisplayModeChanged = D3D_DisplayModeChanged; |
437 renderer->CreateTexture = D3D_CreateTexture; | 429 renderer->CreateTexture = D3D_CreateTexture; |
438 renderer->QueryTexturePixels = D3D_QueryTexturePixels; | 430 renderer->QueryTexturePixels = D3D_QueryTexturePixels; |
439 renderer->SetTexturePalette = D3D_SetTexturePalette; | |
440 renderer->GetTexturePalette = D3D_GetTexturePalette; | |
441 renderer->UpdateTexture = D3D_UpdateTexture; | 431 renderer->UpdateTexture = D3D_UpdateTexture; |
442 renderer->LockTexture = D3D_LockTexture; | 432 renderer->LockTexture = D3D_LockTexture; |
443 renderer->UnlockTexture = D3D_UnlockTexture; | 433 renderer->UnlockTexture = D3D_UnlockTexture; |
444 renderer->DirtyTexture = D3D_DirtyTexture; | 434 renderer->DirtyTexture = D3D_DirtyTexture; |
445 renderer->RenderDrawPoints = D3D_RenderDrawPoints; | 435 renderer->RenderDrawPoints = D3D_RenderDrawPoints; |
662 return -1; | 652 return -1; |
663 } | 653 } |
664 } | 654 } |
665 | 655 |
666 static int | 656 static int |
667 D3D_SetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, | |
668 const SDL_Color * colors, int firstcolor, int ncolors) | |
669 { | |
670 D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata; | |
671 D3D_TextureData *data = (D3D_TextureData *) texture->driverdata; | |
672 | |
673 return 0; | |
674 } | |
675 | |
676 static int | |
677 D3D_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture, | |
678 SDL_Color * colors, int firstcolor, int ncolors) | |
679 { | |
680 D3D_TextureData *data = (D3D_TextureData *) texture->driverdata; | |
681 | |
682 return 0; | |
683 } | |
684 | |
685 static int | |
686 D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 657 D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
687 const SDL_Rect * rect, const void *pixels, int pitch) | 658 const SDL_Rect * rect, const void *pixels, int pitch) |
688 { | 659 { |
689 D3D_TextureData *data = (D3D_TextureData *) texture->driverdata; | 660 D3D_TextureData *data = (D3D_TextureData *) texture->driverdata; |
690 D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata; | 661 D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata; |