src/video/win32/SDL_d3drender.c
changeset 2933 73f84b1e25e5
parent 2932 676754cc1acb
child 2972 0a4b70368372
equal deleted inserted replaced
2932:676754cc1acb 2933:73f84b1e25e5
   710         IDirect3DTexture9_AddDirtyRect(data->texture, &d3drect);
   710         IDirect3DTexture9_AddDirtyRect(data->texture, &d3drect);
   711     }
   711     }
   712 }
   712 }
   713 
   713 
   714 static void
   714 static void
   715 D3D_SetBlendMode(D3D_RenderData *data, int blendMode)
   715 D3D_SetBlendMode(D3D_RenderData * data, int blendMode)
   716 {
   716 {
   717     switch (blendMode) {
   717     switch (blendMode) {
   718     case SDL_BLENDMODE_NONE:
   718     case SDL_BLENDMODE_NONE:
   719         IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE,
   719         IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE,
   720                                         FALSE);
   720                                         FALSE);
   770     vertices[0].u = 0.0f;
   770     vertices[0].u = 0.0f;
   771     vertices[0].v = 0.0f;
   771     vertices[0].v = 0.0f;
   772 
   772 
   773     D3D_SetBlendMode(data, renderer->blendMode);
   773     D3D_SetBlendMode(data, renderer->blendMode);
   774 
   774 
   775     result = IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)0);
   775     result =
       
   776         IDirect3DDevice9_SetTexture(data->device, 0,
       
   777                                     (IDirect3DBaseTexture9 *) 0);
   776     if (FAILED(result)) {
   778     if (FAILED(result)) {
   777         D3D_SetError("SetTexture()", result);
   779         D3D_SetError("SetTexture()", result);
   778         return -1;
   780         return -1;
   779     }
   781     }
   780     result =
   782     result =
   818     vertices[1].u = 0.0f;
   820     vertices[1].u = 0.0f;
   819     vertices[1].v = 0.0f;
   821     vertices[1].v = 0.0f;
   820 
   822 
   821     D3D_SetBlendMode(data, renderer->blendMode);
   823     D3D_SetBlendMode(data, renderer->blendMode);
   822 
   824 
   823     result = IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)0);
   825     result =
       
   826         IDirect3DDevice9_SetTexture(data->device, 0,
       
   827                                     (IDirect3DBaseTexture9 *) 0);
   824     if (FAILED(result)) {
   828     if (FAILED(result)) {
   825         D3D_SetError("SetTexture()", result);
   829         D3D_SetError("SetTexture()", result);
   826         return -1;
   830         return -1;
   827     }
   831     }
   828     result =
   832     result =
   888     vertices[3].u = 0.0f;
   892     vertices[3].u = 0.0f;
   889     vertices[3].v = 0.0f;
   893     vertices[3].v = 0.0f;
   890 
   894 
   891     D3D_SetBlendMode(data, renderer->blendMode);
   895     D3D_SetBlendMode(data, renderer->blendMode);
   892 
   896 
   893     result = IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)0);
   897     result =
       
   898         IDirect3DDevice9_SetTexture(data->device, 0,
       
   899                                     (IDirect3DBaseTexture9 *) 0);
   894     if (FAILED(result)) {
   900     if (FAILED(result)) {
   895         D3D_SetError("SetTexture()", result);
   901         D3D_SetError("SetTexture()", result);
   896         return -1;
   902         return -1;
   897     }
   903     }
   898     result =
   904     result =