# HG changeset patch # User Sam Lantinga # Date 1258871863 0 # Node ID cd763d104465ddb2da731aaa25cff621f52fa2f7 # Parent 6f887204fa7a1fb694ec1b3f77781b8b24f91094 The Direct3D Read/Write pixels interface is in progress. diff -r 6f887204fa7a -r cd763d104465 src/video/win32/SDL_d3drender.c --- 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) {