app

package
v0.0.0-...-428aa4c Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppBase

type AppBase struct {
	vkg.GraphicsApp

	GraphicsModules []IGraphicsModule
	InputModules    []IInputModule
	// contains filtered or unexported fields
}

func NewAppBase

func NewAppBase(appName string, width, height int) (*AppBase, error)

func (*AppBase) AddGraphicsModule

func (b *AppBase) AddGraphicsModule(g IGraphicsModule)

func (*AppBase) AddInputModule

func (b *AppBase) AddInputModule(i IInputModule)

func (*AppBase) Destroy

func (b *AppBase) Destroy()

func (*AppBase) Init

func (b *AppBase) Init() error

func (*AppBase) NewFrame

func (b *AppBase) NewFrame()

func (*AppBase) PostFrame

func (b *AppBase) PostFrame()

func (*AppBase) ShouldClose

func (b *AppBase) ShouldClose() bool

type IGraphicsModule

type IGraphicsModule interface {
	NewFrame(base *AppBase)
	PostFrame()
	Destroy()
	CreateCommandBuffers(renderPass vk.RenderPass, framebuffer vk.Framebuffer, app *AppBase) ([]vk.CommandBuffer, error)
}

type IInputModule

type IInputModule interface {
	KeyChange(key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) bool
	MouseScrollChange(x, y float64) bool
	MouseButtonChange(rawButton glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey) bool
	CharChange(char rune) bool
}

Jump to

Keyboard shortcuts

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