Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_d3drender.c @ 3480:cd763d104465
The Direct3D Read/Write pixels interface is in progress.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 22 Nov 2009 06:37:43 +0000 |
parents | 36cf454ba065 |
children | 1b22878e04d0 |
line wrap: on
line diff
--- a/src/video/win32/SDL_d3drender.c Sun Nov 22 06:34:45 2009 +0000 +++ b/src/video/win32/SDL_d3drender.c Sun Nov 22 06:37:43 2009 +0000 @@ -73,7 +73,9 @@ static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect); static int D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - void * pixels, int pitch); + Uint32 format, void * pixels, int pitch); +static int D3D_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, + Uint32 format, const void * pixels, int pitch); static void D3D_RenderPresent(SDL_Renderer * renderer); static void D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture); @@ -370,6 +372,7 @@ renderer->RenderFill = D3D_RenderFill; renderer->RenderCopy = D3D_RenderCopy; renderer->RenderReadPixels = D3D_RenderReadPixels; + renderer->RenderWritePixels = D3D_RenderWritePixels; renderer->RenderPresent = D3D_RenderPresent; renderer->DestroyTexture = D3D_DestroyTexture; renderer->DestroyRenderer = D3D_DestroyRenderer; @@ -1150,7 +1153,7 @@ static int D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - void * pixels, int pitch) + Uint32 format, void * pixels, int pitch) { BYTE * pBytes; D3DLOCKED_RECT lockedRect; @@ -1192,6 +1195,14 @@ return -1; } +static int +D3D_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, + Uint32 format, const void * pixels, int pitch) +{ + /* Work in progress */ + return -1; +} + static void D3D_RenderPresent(SDL_Renderer * renderer) {