mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 11:38:55 +01:00
internal/graphicsdriver/directx: refactoring
This makes more explicit that the pixels are sent after the slice for the pixels finishes modification.
This commit is contained in:
parent
cfdf59ef8d
commit
c7fcfe5bf7
@ -1627,7 +1627,9 @@ func (i *Image) WritePixels(args []*graphicsdriver.WritePixelsArgs) error {
|
||||
for j := 0; j < a.Height; j++ {
|
||||
copy(srcBytes[(a.Y+j)*int(i.layouts.Footprint.RowPitch)+a.X*4:], a.Pixels[j*a.Width*4:(j+1)*a.Width*4])
|
||||
}
|
||||
}
|
||||
|
||||
for _, a := range args {
|
||||
dst := _D3D12_TEXTURE_COPY_LOCATION_SubresourceIndex{
|
||||
pResource: i.texture,
|
||||
Type: _D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX,
|
||||
|
Loading…
Reference in New Issue
Block a user