mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 18:07:40 +00:00
direct3d: Fix dirty textures failing to update
Even if the texture itself has not changed since last time, the data may have so we must call UpdateDirtyTexture() to handle that possibility.
This commit is contained in:
parent
f3226457e0
commit
e681623cb2
1 changed files with 7 additions and 0 deletions
|
@ -1127,6 +1127,13 @@ SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd)
|
|||
}
|
||||
|
||||
data->drawstate.texture = texture;
|
||||
} else if (texture) {
|
||||
D3D_TextureData *texturedata = (D3D_TextureData *) texture->driverdata;
|
||||
UpdateDirtyTexture(data->device, &texturedata->texture);
|
||||
if (texturedata->yuv) {
|
||||
UpdateDirtyTexture(data->device, &texturedata->utexture);
|
||||
UpdateDirtyTexture(data->device, &texturedata->vtexture);
|
||||
}
|
||||
}
|
||||
|
||||
if (blend != data->drawstate.blend) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue