render

package
v0.0.0-...-5233882 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2013 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWindow

func CreateWindow(width, height int, name string, fullscreen bool, delegate WindowDelegate, legacy bool) error

func WindowAspectRatio

func WindowAspectRatio(window *glfw.Window) float64

Types

type DoSimulation

type DoSimulation func()

type GameTime

type GameTime struct {
	Now     time.Time
	Elapsed time.Duration
	Delta   time.Duration
}

type IdleSimulatorWindowDelegator

type IdleSimulatorWindowDelegator struct {
	WindowDelegator
	DoSimulate DoSimulation
}

func (*IdleSimulatorWindowDelegator) KeyPress

func (wd *IdleSimulatorWindowDelegator) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, mods glfw.ModifierKey)

func (*IdleSimulatorWindowDelegator) MouseClick

func (wd *IdleSimulatorWindowDelegator) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey)

func (*IdleSimulatorWindowDelegator) MouseMove

func (wd *IdleSimulatorWindowDelegator) MouseMove(window *glfw.Window, xpos float64, ypos float64)

func (*IdleSimulatorWindowDelegator) Scroll

func (wd *IdleSimulatorWindowDelegator) Scroll(window *glfw.Window, xoff float64, yoff float64)

type WindowDelegate

type WindowDelegate interface {
	Init(window *glfw.Window)
	Draw(window *glfw.Window)
	Reshape(window *glfw.Window, width, height int)
	MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey)
	MouseMove(window *glfw.Window, xpos float64, ypos float64)
	KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, mods glfw.ModifierKey)
	Scroll(window *glfw.Window, xoff float64, yoff float64)
	Simulate(time GameTime)
	OnClose(window *glfw.Window)
	IsIdle() bool
	NeedsRender() bool
}

type WindowDelegator

type WindowDelegator struct {
	Delegate WindowDelegate
}

func (*WindowDelegator) Draw

func (wd *WindowDelegator) Draw(window *glfw.Window)

func (*WindowDelegator) Init

func (wd *WindowDelegator) Init(window *glfw.Window)

func (*WindowDelegator) IsIdle

func (wd *WindowDelegator) IsIdle() bool

func (*WindowDelegator) KeyPress

func (wd *WindowDelegator) KeyPress(window *glfw.Window, k glfw.Key, s int, action glfw.Action, mods glfw.ModifierKey)

func (*WindowDelegator) MouseClick

func (wd *WindowDelegator) MouseClick(window *glfw.Window, button glfw.MouseButton, action glfw.Action, mod glfw.ModifierKey)

func (*WindowDelegator) MouseMove

func (wd *WindowDelegator) MouseMove(window *glfw.Window, xpos float64, ypos float64)

func (*WindowDelegator) NeedsRender

func (wd *WindowDelegator) NeedsRender() bool

func (*WindowDelegator) OnClose

func (wd *WindowDelegator) OnClose(window *glfw.Window)

func (*WindowDelegator) Reshape

func (wd *WindowDelegator) Reshape(window *glfw.Window, width, height int)

func (*WindowDelegator) Scroll

func (wd *WindowDelegator) Scroll(window *glfw.Window, xoff float64, yoff float64)

func (*WindowDelegator) Simulate

func (wd *WindowDelegator) Simulate(time GameTime)

Jump to

Keyboard shortcuts

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