mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08: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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"runtime"
|
"runtime"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
@ -963,7 +964,7 @@ func (i *_ID3D11DeviceContext) ClearState() {
|
|||||||
|
|
||||||
func (i *_ID3D11DeviceContext) ClearDepthStencilView(pDepthStencilView *_ID3D11DepthStencilView, clearFlags uint8, depth float32, stencil uint8) {
|
func (i *_ID3D11DeviceContext) ClearDepthStencilView(pDepthStencilView *_ID3D11DepthStencilView, clearFlags uint8, depth float32, stencil uint8) {
|
||||||
_, _, _ = syscall.Syscall6(i.vtbl.ClearDepthStencilView, 5, uintptr(unsafe.Pointer(i)),
|
_, _, _ = 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)
|
uintptr(stencil), 0)
|
||||||
runtime.KeepAlive(pDepthStencilView)
|
runtime.KeepAlive(pDepthStencilView)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user