src/render/direct3d/SDL_render_d3d.c
changeset 6236 4a7abc1b6b0e
parent 6232 37e8d0736366
child 6237 240f1bced46b
equal deleted inserted replaced
6235:d169541f5049 6236:4a7abc1b6b0e
   571 static int
   571 static int
   572 D3D_SetTargetTexture(SDL_Renderer * renderer, SDL_Texture * texture)
   572 D3D_SetTargetTexture(SDL_Renderer * renderer, SDL_Texture * texture)
   573 {
   573 {
   574     D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
   574     D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
   575     D3D_TextureData *texturedata;
   575     D3D_TextureData *texturedata;
       
   576     D3DMATRIX matrix;
   576     HRESULT result;
   577     HRESULT result;
   577 
   578 
   578     if (!renderer) return -1;
   579     if (!renderer) return -1;
   579     D3D_ActivateRenderer(renderer);
   580     D3D_ActivateRenderer(renderer);
   580 
   581 
   588         IDirect3DSurface9_Release(data->currentRenderTarget);
   589         IDirect3DSurface9_Release(data->currentRenderTarget);
   589         data->currentRenderTarget = NULL;
   590         data->currentRenderTarget = NULL;
   590     }
   591     }
   591 
   592 
   592     /* Prepare an identity world and view matrix */
   593     /* Prepare an identity world and view matrix */
   593     D3DMATRIX matrix;
       
   594     matrix.m[0][0] = 1.0f;
   594     matrix.m[0][0] = 1.0f;
   595     matrix.m[0][1] = 0.0f;
   595     matrix.m[0][1] = 0.0f;
   596     matrix.m[0][2] = 0.0f;
   596     matrix.m[0][2] = 0.0f;
   597     matrix.m[0][3] = 0.0f;
   597     matrix.m[0][3] = 0.0f;
   598     matrix.m[1][0] = 0.0f;
   598     matrix.m[1][0] = 0.0f;