shared

package
v0.0.0-...-6e38400 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIgnoreDraw

func DefaultIgnoreDraw()

func DefaultIgnoreInput

func DefaultIgnoreInput(map[byte]bool, time.Duration)

func DefaultIgnoreTick

func DefaultIgnoreTick(time.Duration)

func GetWindowExtent

func GetWindowExtent(hWnd win32.HWnd) vk.Extent2D

func PrettyWin32Msg

func PrettyWin32Msg(msg win32.MSG) string

Types

type DrawFunc

type DrawFunc func()

type ProcessInputFunc

type ProcessInputFunc func(keys map[byte]bool, deltaT time.Duration)

type TickFunc

type TickFunc func(deltaT time.Duration)

type Win32App

type Win32App struct {
	HInstance win32.HInstance
	HWnd      win32.HWnd

	ClassName     string
	Width, Height uint32
	// contains filtered or unexported fields
}

func NewWin32App

func NewWin32App(c chan WindowMessage) *Win32App

To use this application template, get a new instance from this function, call app.Initialize("My Window Title") to create a window and initialize Vulkan, and then call app.MainLoop(). The app will gracefully shut down when the window is closed.

func (*Win32App) DefaultMainLoop

func (app *Win32App) DefaultMainLoop(fnInput ProcessInputFunc, fnTick TickFunc, fnDraw DrawFunc)

func (*Win32App) GetRequiredInstanceExtensions

func (app *Win32App) GetRequiredInstanceExtensions() []string

func (*Win32App) Initialize

func (app *Win32App) Initialize(windowTitle string)

func (*Win32App) IsInitialized

func (app *Win32App) IsInitialized() bool

func (*Win32App) Shutdown

func (app *Win32App) Shutdown()

Shutdown is the reverse of Initialize

type WindowMessage

type WindowMessage struct {
	Text string
	HWnd win32.HWnd

	Wparam, Lparam uint // Specifically defined as 64 bits by Win32 on 64-bit systems.

	Character rune
	KeyCode   byte
	IsRepeat  bool
}

Jump to

Keyboard shortcuts

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