Mercurial > sdl-ios-xcode
changeset 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 | 6f887204fa7a |
children | c32c53fca10d |
files | src/video/win32/SDL_d3drender.c |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
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) {