mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/directx: bug fix: getting pixels with non-zero position might not work
This commit is contained in:
parent
2664a2ac50
commit
f58d7e1ab5
@ -1438,12 +1438,12 @@ func (i *Image) ReadPixels(buf []byte, x, y, width, height int) error {
|
||||
}
|
||||
i.graphics.needFlushCopyCommandList = true
|
||||
i.graphics.copyCommandList.CopyTextureRegion_PlacedFootPrint_SubresourceIndex(
|
||||
&dst, uint32(x), uint32(y), 0, &src, &_D3D12_BOX{
|
||||
left: 0,
|
||||
top: 0,
|
||||
&dst, 0, 0, 0, &src, &_D3D12_BOX{
|
||||
left: uint32(x),
|
||||
top: uint32(y),
|
||||
front: 0,
|
||||
right: uint32(width),
|
||||
bottom: uint32(height),
|
||||
right: uint32(x + width),
|
||||
bottom: uint32(y + height),
|
||||
back: 1,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user