mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
gpu: fix depth buffer on direct3d and headless opengl
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user