Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_d3drender.c @ 2919:2f91a3847ae8
Fixed compiling Windows renderers. Lines and points will be implemented later.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 25 Dec 2008 05:16:18 +0000 |
parents | 9dde605c7540 |
children | cdb01906cb7e |
comparison
equal
deleted
inserted
replaced
2918:bd518fc76f28 | 2919:2f91a3847ae8 |
---|---|
60 const SDL_Rect * rect, int markDirty, | 60 const SDL_Rect * rect, int markDirty, |
61 void **pixels, int *pitch); | 61 void **pixels, int *pitch); |
62 static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); | 62 static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); |
63 static void D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, | 63 static void D3D_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture, |
64 int numrects, const SDL_Rect * rects); | 64 int numrects, const SDL_Rect * rects); |
65 static int D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, | 65 static int D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); |
66 Uint8 a, const SDL_Rect * rect); | |
67 static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, | 66 static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, |
68 const SDL_Rect * srcrect, const SDL_Rect * dstrect); | 67 const SDL_Rect * srcrect, const SDL_Rect * dstrect); |
69 static void D3D_RenderPresent(SDL_Renderer * renderer); | 68 static void D3D_RenderPresent(SDL_Renderer * renderer); |
70 static void D3D_DestroyTexture(SDL_Renderer * renderer, | 69 static void D3D_DestroyTexture(SDL_Renderer * renderer, |
71 SDL_Texture * texture); | 70 SDL_Texture * texture); |
706 IDirect3DTexture9_AddDirtyRect(data->texture, &d3drect); | 705 IDirect3DTexture9_AddDirtyRect(data->texture, &d3drect); |
707 } | 706 } |
708 } | 707 } |
709 | 708 |
710 static int | 709 static int |
711 D3D_RenderFill(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a, | 710 D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect) |
712 const SDL_Rect * rect) | |
713 { | 711 { |
714 D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; | 712 D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; |
715 D3DRECT d3drect; | 713 D3DRECT d3drect; |
716 HRESULT result; | 714 HRESULT result; |
717 | 715 |
725 d3drect.y1 = rect->y; | 723 d3drect.y1 = rect->y; |
726 d3drect.y2 = rect->y + rect->h; | 724 d3drect.y2 = rect->y + rect->h; |
727 | 725 |
728 result = | 726 result = |
729 IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET, | 727 IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET, |
730 D3DCOLOR_ARGB(a, r, g, b), 1.0f, 0); | 728 D3DCOLOR_ARGB(renderer->a, |
729 renderer->r, | |
730 renderer->g, | |
731 renderer->b), 1.0f, 0); | |
731 if (FAILED(result)) { | 732 if (FAILED(result)) { |
732 D3D_SetError("Clear()", result); | 733 D3D_SetError("Clear()", result); |
733 return -1; | 734 return -1; |
734 } | 735 } |
735 return 0; | 736 return 0; |