mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/graphicsdriver/directx: bug fix: depth should be passed by math.Float32bits
As depth was always 0, there was not an actual problem.
This commit is contained in:
parent
7652ccef81
commit
e0ccd013ac
@ -16,6 +16,7 @@ package directx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
@ -963,7 +964,7 @@ func (i *_ID3D11DeviceContext) ClearState() {
|
||||
|
||||
func (i *_ID3D11DeviceContext) ClearDepthStencilView(pDepthStencilView *_ID3D11DepthStencilView, clearFlags uint8, depth float32, stencil uint8) {
|
||||
_, _, _ = syscall.Syscall6(i.vtbl.ClearDepthStencilView, 5, uintptr(unsafe.Pointer(i)),
|
||||
uintptr(unsafe.Pointer(pDepthStencilView)), uintptr(clearFlags), uintptr(depth),
|
||||
uintptr(unsafe.Pointer(pDepthStencilView)), uintptr(clearFlags), uintptr(math.Float32bits(depth)),
|
||||
uintptr(stencil), 0)
|
||||
runtime.KeepAlive(pDepthStencilView)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user