src/video/win32/SDL_d3drender.c
changeset 3480 cd763d104465
parent 3427 36cf454ba065
child 3495 1b22878e04d0
equal deleted inserted replaced
3479:6f887204fa7a 3480:cd763d104465
    71                           int y2);
    71                           int y2);
    72 static int D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
    72 static int D3D_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
    73 static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
    73 static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
    74                           const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    74                           const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    75 static int D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
    75 static int D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
    76                                 void * pixels, int pitch);
    76                                 Uint32 format, void * pixels, int pitch);
       
    77 static int D3D_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
       
    78                                  Uint32 format, const void * pixels, int pitch);
    77 static void D3D_RenderPresent(SDL_Renderer * renderer);
    79 static void D3D_RenderPresent(SDL_Renderer * renderer);
    78 static void D3D_DestroyTexture(SDL_Renderer * renderer,
    80 static void D3D_DestroyTexture(SDL_Renderer * renderer,
    79                                SDL_Texture * texture);
    81                                SDL_Texture * texture);
    80 static void D3D_DestroyRenderer(SDL_Renderer * renderer);
    82 static void D3D_DestroyRenderer(SDL_Renderer * renderer);
    81 
    83 
   368     renderer->RenderPoint = D3D_RenderPoint;
   370     renderer->RenderPoint = D3D_RenderPoint;
   369     renderer->RenderLine = D3D_RenderLine;
   371     renderer->RenderLine = D3D_RenderLine;
   370     renderer->RenderFill = D3D_RenderFill;
   372     renderer->RenderFill = D3D_RenderFill;
   371     renderer->RenderCopy = D3D_RenderCopy;
   373     renderer->RenderCopy = D3D_RenderCopy;
   372     renderer->RenderReadPixels = D3D_RenderReadPixels;
   374     renderer->RenderReadPixels = D3D_RenderReadPixels;
       
   375     renderer->RenderWritePixels = D3D_RenderWritePixels;
   373     renderer->RenderPresent = D3D_RenderPresent;
   376     renderer->RenderPresent = D3D_RenderPresent;
   374     renderer->DestroyTexture = D3D_DestroyTexture;
   377     renderer->DestroyTexture = D3D_DestroyTexture;
   375     renderer->DestroyRenderer = D3D_DestroyRenderer;
   378     renderer->DestroyRenderer = D3D_DestroyRenderer;
   376     renderer->info = D3D_RenderDriver.info;
   379     renderer->info = D3D_RenderDriver.info;
   377     renderer->window = window->id;
   380     renderer->window = window->id;
  1148     return 0;
  1151     return 0;
  1149 }
  1152 }
  1150 
  1153 
  1151 static int
  1154 static int
  1152 D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
  1155 D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
  1153                      void * pixels, int pitch)
  1156                      Uint32 format, void * pixels, int pitch)
  1154 {
  1157 {
  1155     BYTE * pBytes;
  1158     BYTE * pBytes;
  1156     D3DLOCKED_RECT lockedRect;
  1159     D3DLOCKED_RECT lockedRect;
  1157     BYTE b, g, r, a;
  1160     BYTE b, g, r, a;
  1158     unsigned long index;
  1161     unsigned long index;
  1190     // <--
  1193     // <--
  1191     
  1194     
  1192     return -1;
  1195     return -1;
  1193 }
  1196 }
  1194 
  1197 
       
  1198 static int
       
  1199 D3D_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
       
  1200                       Uint32 format, const void * pixels, int pitch)
       
  1201 {
       
  1202     /* Work in progress */
       
  1203     return -1;
       
  1204 }
       
  1205 
  1195 static void
  1206 static void
  1196 D3D_RenderPresent(SDL_Renderer * renderer)
  1207 D3D_RenderPresent(SDL_Renderer * renderer)
  1197 {
  1208 {
  1198     D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
  1209     D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
  1199     HRESULT result;
  1210     HRESULT result;