dxgi

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2022 License: BSD-3-Clause, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DXGI_MAP_READ    = 1 << 0
	DXGI_MAP_WRITE   = 1 << 1
	DXGI_MAP_DISCARD = 1 << 2
)

Variables

View Source
var (

	// iid_IDXGIDevice, _   = windows.GUIDFromString("{54ec77fa-1377-44e6-8c32-88fd5f44c84c}")
	IID_IDXGIDevice1, _ = windows.GUIDFromString("{77db970f-6276-48ba-ba28-070143b4392c}")
	// IID_IDXGIAdapter, _  = windows.GUIDFromString("{2411E7E1-12AC-4CCF-BD14-9798E8534DC0}")
	IID_IDXGIAdapter1, _ = windows.GUIDFromString("{29038f61-3839-4626-91fd-086879011a05}")
	// IID_IDXGIOutput, _   = windows.GUIDFromString("{ae02eedb-c735-4690-8d52-5a8dc20213aa}")
	IID_IDXGIOutput1, _  = windows.GUIDFromString("{00cddea8-939b-4b83-a340-a685226666cc}")
	IID_IDXGIOutput5, _  = windows.GUIDFromString("{80A07424-AB52-42EB-833C-0C42FD282D98}")
	IID_IDXGIFactory1, _ = windows.GUIDFromString("{770aae78-f26f-4dba-a829-253c83d1b387}")
	// IID_IDXGIResource, _ = windows.GUIDFromString("{035f3ab4-482e-4e50-b41f-8a7f8bd8960b}")
	IID_IDXGISurface, _ = windows.GUIDFromString("{cafcb56c-6ac3-4889-bf47-9e23bbd260ec}")
)

Functions

func CreateDXGIFactory1

func CreateDXGIFactory1(ppFactory **IDXGIFactory1) error

Types

type DXGI_FORMAT

type DXGI_FORMAT uint32
const (
	DXGI_FORMAT_R8G8B8A8_UNORM DXGI_FORMAT = 28
	DXGI_FORMAT_B8G8R8A8_UNORM DXGI_FORMAT = 87
)

type DXGI_MAPPED_RECT

type DXGI_MAPPED_RECT struct {
	Pitch int32
	PBits uintptr
}

type DXGI_MODE_DESC

type DXGI_MODE_DESC struct {
	Width            uint32
	Height           uint32
	Rational         DXGI_RATIONAL
	Format           uint32 // DXGI_FORMAT
	ScanlineOrdering uint32 // DXGI_MODE_SCANLINE_ORDER
	Scaling          uint32 // DXGI_MODE_SCALING
}

type DXGI_OUTDUPL_DESC

type DXGI_OUTDUPL_DESC struct {
	ModeDesc                   DXGI_MODE_DESC
	Rotation                   uint32 // DXGI_MODE_ROTATION
	DesktopImageInSystemMemory uint32 // BOOL
}

type DXGI_OUTDUPL_FRAME_INFO

type DXGI_OUTDUPL_FRAME_INFO struct {
	LastPresentTime           int64
	LastMouseUpdateTime       int64
	AccumulatedFrames         uint32
	RectsCoalesced            uint32
	ProtectedContentMaskedOut uint32
	PointerPosition           DXGI_OUTDUPL_POINTER_POSITION
	TotalMetadataBufferSize   uint32
	PointerShapeBufferSize    uint32
}

type DXGI_OUTDUPL_MOVE_RECT

type DXGI_OUTDUPL_MOVE_RECT struct {
	Src  POINT
	Dest RECT
}

type DXGI_OUTDUPL_POINTER_POSITION

type DXGI_OUTDUPL_POINTER_POSITION struct {
	Position POINT
	Visible  uint32
}

type DXGI_OUTDUPL_POINTER_SHAPE_INFO

type DXGI_OUTDUPL_POINTER_SHAPE_INFO struct {
	Type    DXGI_OUTDUPL_POINTER_SHAPE_TYPE
	Width   uint32
	Height  uint32
	Pitch   uint32
	HotSpot POINT
}

type DXGI_OUTDUPL_POINTER_SHAPE_TYPE

type DXGI_OUTDUPL_POINTER_SHAPE_TYPE uint32
const (
	DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME   DXGI_OUTDUPL_POINTER_SHAPE_TYPE = 1
	DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR        DXGI_OUTDUPL_POINTER_SHAPE_TYPE = 2
	DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR DXGI_OUTDUPL_POINTER_SHAPE_TYPE = 4
)

func (DXGI_OUTDUPL_POINTER_SHAPE_TYPE) String

type DXGI_RATIONAL

type DXGI_RATIONAL struct {
	Numerator   uint32
	Denominator uint32
}

type DXGI_SAMPLE_DESC

type DXGI_SAMPLE_DESC struct {
	Count   uint32
	Quality uint32
}

type IDXGIAdapter

type IDXGIAdapter struct {
	// contains filtered or unexported fields
}

func (*IDXGIAdapter) EnumOutputs

func (obj *IDXGIAdapter) EnumOutputs(output uint, pp **IDXGIOutput) uint32

func (*IDXGIAdapter) Release

func (obj *IDXGIAdapter) Release() int32

type IDXGIAdapter1

type IDXGIAdapter1 struct {
	// contains filtered or unexported fields
}

func (*IDXGIAdapter1) EnumOutputs

func (obj *IDXGIAdapter1) EnumOutputs(output uint, pp **IDXGIOutput) uint32

func (*IDXGIAdapter1) Release

func (obj *IDXGIAdapter1) Release() int32

type IDXGIAdapter1Vtbl

type IDXGIAdapter1Vtbl struct {
	IDXGIAdapterVtbl

	GetDesc1 uintptr
}

type IDXGIAdapterVtbl

type IDXGIAdapterVtbl struct {
	IDXGIObjectVtbl

	EnumOutputs           uintptr
	GetDesc               uintptr
	CheckInterfaceSupport uintptr
}

type IDXGIDevice

type IDXGIDevice struct {
	// contains filtered or unexported fields
}

func (*IDXGIDevice) GetAdapter

func (obj *IDXGIDevice) GetAdapter(pAdapter **IDXGIAdapter) int32

func (*IDXGIDevice) GetGPUThreadPriority

func (obj *IDXGIDevice) GetGPUThreadPriority(priority *int) int32

func (*IDXGIDevice) GetParent

func (obj *IDXGIDevice) GetParent(iid windows.GUID, pp *unsafe.Pointer) int32

func (*IDXGIDevice) QueryInterface

func (obj *IDXGIDevice) QueryInterface(iid windows.GUID, pp interface{}) int32

func (*IDXGIDevice) Release

func (obj *IDXGIDevice) Release() int32

type IDXGIDevice1

type IDXGIDevice1 struct {
	// contains filtered or unexported fields
}

func (*IDXGIDevice1) GetAdapter

func (obj *IDXGIDevice1) GetAdapter(pAdapter *IDXGIAdapter) int32

func (*IDXGIDevice1) GetParent

func (obj *IDXGIDevice1) GetParent(iid windows.GUID, pp *unsafe.Pointer) int32

func (*IDXGIDevice1) QueryInterface

func (obj *IDXGIDevice1) QueryInterface(iid windows.GUID, pp interface{}) int32

func (*IDXGIDevice1) Release

func (obj *IDXGIDevice1) Release() int32

type IDXGIDevice1Vtbl

type IDXGIDevice1Vtbl struct {
	IDXGIDeviceVtbl

	GetMaximumFrameLatency uintptr
	SetMaximumFrameLatency uintptr
}

type IDXGIDeviceSubObjectVtbl

type IDXGIDeviceSubObjectVtbl struct {
	IDXGIObjectVtbl

	GetDevice uintptr
}

type IDXGIDeviceVtbl

type IDXGIDeviceVtbl struct {
	IDXGIObjectVtbl

	CreateSurface          uintptr
	GetAdapter             uintptr
	GetGPUThreadPriority   uintptr
	QueryResourceResidency uintptr
	SetGPUThreadPriority   uintptr
}

type IDXGIFactory1

type IDXGIFactory1 struct {
	// contains filtered or unexported fields
}

func (*IDXGIFactory1) EnumAdapters1

func (obj *IDXGIFactory1) EnumAdapters1(adapter uint, pp **IDXGIAdapter1) int32

func (*IDXGIFactory1) Release

func (obj *IDXGIFactory1) Release() int32

type IDXGIFactory1Vtbl

type IDXGIFactory1Vtbl struct {
	IDXGIFactoryVtbl

	EnumAdapters1 uintptr
	IsCurrent     uintptr
}

type IDXGIFactoryVtbl

type IDXGIFactoryVtbl struct {
	IDXGIObjectVtbl

	EnumAdapters          uintptr
	MakeWindowAssociation uintptr
	GetWindowAssociation  uintptr
	CreateSwapChain       uintptr
	CreateSoftwareAdapter uintptr
}

type IDXGIObjectVtbl

type IDXGIObjectVtbl struct {
	com.IUnknownVtbl

	SetPrivateData          uintptr
	SetPrivateDataInterface uintptr
	GetPrivateData          uintptr
	GetParent               uintptr
}

type IDXGIOutput

type IDXGIOutput struct {
	// contains filtered or unexported fields
}

func (*IDXGIOutput) GetParent

func (obj *IDXGIOutput) GetParent(iid windows.GUID, pp *unsafe.Pointer) int32

func (*IDXGIOutput) QueryInterface

func (obj *IDXGIOutput) QueryInterface(iid windows.GUID, pp interface{}) int32

func (*IDXGIOutput) Release

func (obj *IDXGIOutput) Release() int32

type IDXGIOutput1

type IDXGIOutput1 struct {
	// contains filtered or unexported fields
}

func (*IDXGIOutput1) DuplicateOutput

func (obj *IDXGIOutput1) DuplicateOutput(device1 *IDXGIDevice1, ppOutputDuplication **IDXGIOutputDuplication) int32

func (*IDXGIOutput1) GetParent

func (obj *IDXGIOutput1) GetParent(iid windows.GUID, pp *unsafe.Pointer) int32

func (*IDXGIOutput1) Release

func (obj *IDXGIOutput1) Release() int32

type IDXGIOutput1Vtbl

type IDXGIOutput1Vtbl struct {
	IDXGIOutputVtbl

	GetDisplayModeList1      uintptr
	FindClosestMatchingMode1 uintptr
	GetDisplaySurfaceData1   uintptr
	DuplicateOutput          uintptr
}

type IDXGIOutput2Vtbl

type IDXGIOutput2Vtbl struct {
	IDXGIOutput1Vtbl

	SupportsOverlays uintptr
}

type IDXGIOutput3Vtbl

type IDXGIOutput3Vtbl struct {
	IDXGIOutput2Vtbl

	CheckOverlaySupport uintptr
}

type IDXGIOutput4Vtbl

type IDXGIOutput4Vtbl struct {
	IDXGIOutput3Vtbl

	CheckOverlayColorSpaceSupport uintptr
}

type IDXGIOutput5

type IDXGIOutput5 struct {
	// contains filtered or unexported fields
}

func (*IDXGIOutput5) DuplicateOutput1

func (obj *IDXGIOutput5) DuplicateOutput1(device1 *IDXGIDevice1, flags uint, pSupportedFormats []DXGI_FORMAT, ppOutputDuplication **IDXGIOutputDuplication) int32

func (*IDXGIOutput5) GetParent

func (obj *IDXGIOutput5) GetParent(iid windows.GUID, pp *unsafe.Pointer) int32

func (*IDXGIOutput5) Release

func (obj *IDXGIOutput5) Release() int32

type IDXGIOutput5Vtbl

type IDXGIOutput5Vtbl struct {
	IDXGIOutput4Vtbl

	DuplicateOutput1 uintptr
}

type IDXGIOutputDuplication

type IDXGIOutputDuplication struct {
	// contains filtered or unexported fields
}

func (*IDXGIOutputDuplication) AcquireNextFrame

func (obj *IDXGIOutputDuplication) AcquireNextFrame(timeoutMs uint, pFrameInfo *DXGI_OUTDUPL_FRAME_INFO, ppDesktopResource **IDXGIResource) uint32

func (*IDXGIOutputDuplication) AddRef

func (obj *IDXGIOutputDuplication) AddRef() uint32

func (*IDXGIOutputDuplication) GetDesc

func (obj *IDXGIOutputDuplication) GetDesc(desc *DXGI_OUTDUPL_DESC) int32

func (*IDXGIOutputDuplication) GetFrameDirtyRects

func (obj *IDXGIOutputDuplication) GetFrameDirtyRects(buffer []RECT, rectsRequired *uint32) int32

func (*IDXGIOutputDuplication) GetFrameMoveRects

func (obj *IDXGIOutputDuplication) GetFrameMoveRects(buffer []DXGI_OUTDUPL_MOVE_RECT, rectsRequired *uint32) int32

func (*IDXGIOutputDuplication) GetFramePointerShape

func (obj *IDXGIOutputDuplication) GetFramePointerShape(pointerShapeBufferSize uint32,
	pPointerShapeBuffer []byte,
	pPointerShapeBufferSizeRequired *uint32,
	pPointerShapeInfo *DXGI_OUTDUPL_POINTER_SHAPE_INFO) int32

func (*IDXGIOutputDuplication) MapDesktopSurface

func (obj *IDXGIOutputDuplication) MapDesktopSurface(pLockedRect *DXGI_MAPPED_RECT) int32

func (*IDXGIOutputDuplication) Release

func (obj *IDXGIOutputDuplication) Release() uint32

func (*IDXGIOutputDuplication) ReleaseFrame

func (obj *IDXGIOutputDuplication) ReleaseFrame()

func (*IDXGIOutputDuplication) UnMapDesktopSurface

func (obj *IDXGIOutputDuplication) UnMapDesktopSurface() int32

type IDXGIOutputDuplicationVtbl

type IDXGIOutputDuplicationVtbl struct {
	IDXGIObjectVtbl

	GetDesc              uintptr
	AcquireNextFrame     uintptr
	GetFrameDirtyRects   uintptr
	GetFrameMoveRects    uintptr
	GetFramePointerShape uintptr
	MapDesktopSurface    uintptr
	UnMapDesktopSurface  uintptr
	ReleaseFrame         uintptr
}

type IDXGIOutputVtbl

type IDXGIOutputVtbl struct {
	IDXGIObjectVtbl

	GetDesc                     uintptr
	GetDisplayModeList          uintptr
	FindClosestMatchingMode     uintptr
	WaitForVBlank               uintptr
	TakeOwnership               uintptr
	ReleaseOwnership            uintptr
	GetGammaControlCapabilities uintptr
	SetGammaControl             uintptr
	GetGammaControl             uintptr
	SetDisplaySurface           uintptr
	GetDisplaySurfaceData       uintptr
	GetFrameStatistics          uintptr
}

type IDXGIResource

type IDXGIResource struct {
	// contains filtered or unexported fields
}

func (*IDXGIResource) QueryInterface

func (obj *IDXGIResource) QueryInterface(iid windows.GUID, pp interface{}) int32

func (*IDXGIResource) Release

func (obj *IDXGIResource) Release() int32

type IDXGIResourceVtbl

type IDXGIResourceVtbl struct {
	IDXGIDeviceSubObjectVtbl

	GetSharedHandle     uintptr
	GetUsage            uintptr
	SetEvictionPriority uintptr
	GetEvictionPriority uintptr
}

type IDXGISurface

type IDXGISurface struct {
	// contains filtered or unexported fields
}

func (*IDXGISurface) Map

func (obj *IDXGISurface) Map(pLockedRect *DXGI_MAPPED_RECT, mapFlags uint32) int32

func (*IDXGISurface) QueryInterface

func (obj *IDXGISurface) QueryInterface(iid windows.GUID, pp interface{}) int32

func (*IDXGISurface) Release

func (obj *IDXGISurface) Release() int32

func (*IDXGISurface) Unmap

func (obj *IDXGISurface) Unmap() int32

type IDXGISurfaceVtbl

type IDXGISurfaceVtbl struct {
	IDXGIDeviceSubObjectVtbl

	GetDesc uintptr
	Map     uintptr
	Unmap   uintptr
}

type POINT

type POINT struct {
	X int32
	Y int32
}

type RECT

type RECT struct {
	Left, Top, Right, Bottom int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL