Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
The Direct3D Read/Write pixels interface is in progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 22, 2009
1 parent 30d21e6 commit 130f1bb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/video/win32/SDL_d3drender.c
Expand Up @@ -73,7 +73,9 @@ static int D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
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);
Expand Down Expand Up @@ -370,6 +372,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
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;
Expand Down Expand Up @@ -1150,7 +1153,7 @@ D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,

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;
Expand Down Expand Up @@ -1192,6 +1195,14 @@ D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
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)
{
Expand Down

0 comments on commit 130f1bb

Please sign in to comment.