The Direct3D Read/Write pixels interface is in progress.
authorSam Lantinga <slouken@libsdl.org>
Sun, 22 Nov 2009 06:37:43 +0000
changeset 3480 cd763d104465
parent 3479 6f887204fa7a
child 3481 c32c53fca10d
The Direct3D Read/Write pixels interface is in progress.
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)
 {