src/video/win32/SDL_d3drender.c
changeset 2222 926294b2bb4e
parent 1991 3863ba81c1d6
child 2698 e1da92da346c
     1.1 --- a/src/video/win32/SDL_d3drender.c	Sat Aug 11 20:46:24 2007 +0000
     1.2 +++ b/src/video/win32/SDL_d3drender.c	Sat Aug 11 20:54:31 2007 +0000
     1.3 @@ -459,7 +459,6 @@
     1.4      SDL_Window *window = SDL_GetWindowFromID(renderer->window);
     1.5      SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
     1.6      D3D_TextureData *data;
     1.7 -    D3DPOOL pool;
     1.8      HRESULT result;
     1.9  
    1.10      data = (D3D_TextureData *) SDL_calloc(1, sizeof(*data));
    1.11 @@ -470,22 +469,11 @@
    1.12  
    1.13      texture->driverdata = data;
    1.14  
    1.15 -#if 1
    1.16 -    /* FIXME: Do we want non-managed textures?
    1.17 -       They need to be freed on device reset and then reloaded by the app...
    1.18 -     */
    1.19 -    texture->access = SDL_TEXTUREACCESS_LOCAL;
    1.20 -#endif
    1.21 -    if (texture->access == SDL_TEXTUREACCESS_LOCAL) {
    1.22 -        pool = D3DPOOL_MANAGED;
    1.23 -    } else {
    1.24 -        pool = D3DPOOL_DEFAULT;
    1.25 -    }
    1.26      result =
    1.27          IDirect3DDevice9_CreateTexture(renderdata->device, texture->w,
    1.28                                         texture->h, 1, 0,
    1.29                                         PixelFormatToD3DFMT(texture->format),
    1.30 -                                       pool, &data->texture, NULL);
    1.31 +                                       D3DPOOL_MANAGED, &data->texture, NULL);
    1.32      if (FAILED(result)) {
    1.33          D3D_SetError("CreateTexture()", result);
    1.34          return -1;
    1.35 @@ -628,11 +616,6 @@
    1.36      D3DLOCKED_RECT locked;
    1.37      HRESULT result;
    1.38  
    1.39 -    if (texture->access != SDL_TEXTUREACCESS_LOCAL) {
    1.40 -        SDL_SetError("Can't lock remote video memory");
    1.41 -        return -1;
    1.42 -    }
    1.43 -
    1.44      d3drect.left = rect->x;
    1.45      d3drect.right = rect->x + rect->w;
    1.46      d3drect.top = rect->y;