gpu: fix depth buffer on direct3d and headless opengl

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-03-11 16:36:08 +01:00
parent 61529c2cb6
commit 7024a0e691
5 changed files with 103 additions and 27 deletions
+15
View File
@@ -912,6 +912,21 @@ func (d *_ID3D11Device) CreateDepthStencilState(desc *_D3D11_DEPTH_STENCIL_DESC)
return state, nil
}
func (s *_IDXGISwapChain) GetDesc() (_DXGI_SWAP_CHAIN_DESC, error) {
var desc _DXGI_SWAP_CHAIN_DESC
r, _, _ := syscall.Syscall(
s.vtbl.GetDesc,
2,
uintptr(unsafe.Pointer(s)),
uintptr(unsafe.Pointer(&desc)),
0,
)
if r != 0 {
return _DXGI_SWAP_CHAIN_DESC{}, ErrorCode{Name: "IDXGISwapChainGetDesc", Code: uint32(r)}
}
return desc, nil
}
func (s *_IDXGISwapChain) ResizeBuffers(buffers, width, height, newFormat, flags uint32) error {
r, _, _ := syscall.Syscall6(
s.vtbl.ResizeBuffers,