src/video/SDL_video.c
branchSDL-1.3
changeset 1678 90bf530ced8e
parent 1677 5e4c5e095925
child 1679 153477a6cc31
equal deleted inserted replaced
1677:5e4c5e095925 1678:90bf530ced8e
  1284     }
  1284     }
  1285     return 0;
  1285     return 0;
  1286 }
  1286 }
  1287 
  1287 
  1288 int
  1288 int
       
  1289 SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int *pitch)
       
  1290 {
       
  1291     SDL_Texture *texture = SDL_GetTextureFromID(textureID);
       
  1292     SDL_Renderer *renderer;
       
  1293 
       
  1294     if (!texture) {
       
  1295         return -1;
       
  1296     }
       
  1297 
       
  1298     renderer = texture->renderer;
       
  1299     if (!renderer->QueryTexturePixels) {
       
  1300         return -1;
       
  1301     }
       
  1302     return renderer->QueryTexturePixels(renderer, texture, pixels, pitch);
       
  1303 }
       
  1304 
       
  1305 int
  1289 SDL_UpdateTexture(SDL_TextureID textureID, SDL_Rect * rect,
  1306 SDL_UpdateTexture(SDL_TextureID textureID, SDL_Rect * rect,
  1290                   const void *pixels, int pitch)
  1307                   const void *pixels, int pitch)
  1291 {
  1308 {
  1292     SDL_Texture *texture = SDL_GetTextureFromID(textureID);
  1309     SDL_Texture *texture = SDL_GetTextureFromID(textureID);
  1293     SDL_Renderer *renderer;
  1310     SDL_Renderer *renderer;