appbase

package
v0.0.0-...-ce4c9c0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: BSD-2-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppBase

type AppBase struct {
	appwindow.AppWindowI // Embedded GlfwWindow
	// contains filtered or unexported fields
}

AppBase

func New

func New(title string, width, height int) *AppBase

New returns the AppBase object

func (*AppBase) Exit

func (a *AppBase) Exit()

Exit requests to terminate the application AppBase will dispatch OnQuit events to registered subscribers which can cancel the process by calling CancelDispatch().

func (*AppBase) KeyState

func (a *AppBase) KeyState() *appwindow.KeyState

KeyState returns the application's KeyState.

func (*AppBase) Renderer

func (a *AppBase) Renderer() *renderer.Renderer

Renderer returns the application's renderer.

func (*AppBase) Run

func (a *AppBase) Run(update func(rend *renderer.Renderer, deltaTime time.Duration))

Run starts the update loop. It calls the user-provided update function every frame.

func (*AppBase) RunTime

func (a *AppBase) RunTime() time.Duration

RunTime returns the elapsed duration since the call to Run().

Jump to

Keyboard shortcuts

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