func (obj *SwapChain) GetDisplayMode() (mode DISPLAYMODE, err Error) {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.GetDisplayMode,
		2,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&mode)),
		0,
	)
	err = toErr(ret)
	return
}
GetDisplayMode retrieves the display mode's spatial resolution, color
resolution, and refresh frequency.
package d3d9
import (
	"syscall"
	"unsafe"
)
type SwapChain struct {
	vtbl *swapChainVtbl
}
type swapChainVtbl struct {
	QueryInterface uintptr
	AddRef         uintptr
	Release        uintptr
	Present              uintptr
	GetFrontBufferData   uintptr
	GetBackBuffer        uintptr
	GetRasterStatus      uintptr
	GetDisplayMode       uintptr
	GetDevice            uintptr
	GetPresentParameters uintptr
}
func (obj *SwapChain) AddRef() uint32 {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.AddRef,
		1,
		uintptr(unsafe.Pointer(obj)),
		0,
		0,
	)
	return uint32(ret)
}
func (obj *SwapChain) Release() uint32 {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.Release,
		1,
		uintptr(unsafe.Pointer(obj)),
		0,
		0,
	)
	return uint32(ret)
}
func (obj *SwapChain) Present(
	sourceRect *RECT,
	destRect *RECT,
	destWindowOverride HWND,
	dirtyRegion *RGNDATA,
	flags uint32,
) Error {
	ret, _, _ := syscall.Syscall6(
		obj.vtbl.Present,
		6,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(sourceRect)),
		uintptr(unsafe.Pointer(destRect)),
		uintptr(destWindowOverride),
		uintptr(unsafe.Pointer(dirtyRegion)),
		uintptr(flags),
	)
	return toErr(ret)
}
func (obj *SwapChain) GetFrontBufferData(destSurface *Surface) Error {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.GetFrontBufferData,
		2,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(destSurface)),
		0,
	)
	return toErr(ret)
}
func (obj *SwapChain) GetBackBuffer(
	backBuffer uint,
	typ BACKBUFFER_TYPE,
) (buffer *Surface, err Error) {
	ret, _, _ := syscall.Syscall6(
		obj.vtbl.GetBackBuffer,
		4,
		uintptr(unsafe.Pointer(obj)),
		uintptr(backBuffer),
		uintptr(typ),
		uintptr(unsafe.Pointer(&buffer)),
		0,
		0,
	)
	err = toErr(ret)
	return
}
func (obj *SwapChain) GetRasterStatus() (status RASTER_STATUS, err Error) {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.GetRasterStatus,
		2,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&status)),
		0,
	)
	err = toErr(ret)
	return
}