mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
app/internal/d3d11: only use passed in ID3D11Device in NewBackend
We're about to enable drawing into foreign Direct3D contexts. In preparation, NewBackend should only need a device handle. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -924,6 +924,18 @@ func (d *_ID3D11Device) GetFeatureLevel() int {
|
||||
return int(lvl)
|
||||
}
|
||||
|
||||
func (d *_ID3D11Device) GetImmediateContext() *_ID3D11DeviceContext {
|
||||
var ctx *_ID3D11DeviceContext
|
||||
syscall.Syscall(
|
||||
d.vtbl.GetImmediateContext,
|
||||
2,
|
||||
uintptr(unsafe.Pointer(d)),
|
||||
uintptr(unsafe.Pointer(&ctx)),
|
||||
0,
|
||||
)
|
||||
return ctx
|
||||
}
|
||||
|
||||
func (s *_IDXGISwapChain) GetDesc() (_DXGI_SWAP_CHAIN_DESC, error) {
|
||||
var desc _DXGI_SWAP_CHAIN_DESC
|
||||
r, _, _ := syscall.Syscall(
|
||||
|
||||
Reference in New Issue
Block a user