engine

package
v0.0.0-...-224eed5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	// Window starting position x axis, if applicable.
	StartPosX uint32
	// Window starting position y axis, if applicable.
	StartPosY uint32
	// Window starting width, if applicable.
	StartWidth uint32
	// Window starting height, if applicable.
	StartHeight uint32
	// The application name used in windowing, if applicable.
	Name              string
	LogLevel          core.LogLevel
	RenderViewConfigs []*metadata.RenderViewConfig
}

type Boot

type Boot func() error

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(g *Game) (*Engine, error)

func (*Engine) GetFramebufferSize

func (e *Engine) GetFramebufferSize() (uint32, uint32)

ApplicationGetFramebufferSize returns the width and height (in this order) of the application Framebuffer

func (*Engine) Initialize

func (e *Engine) Initialize() error

func (*Engine) Run

func (e *Engine) Run() error

func (*Engine) Shutdown

func (e *Engine) Shutdown() error

type Game

type Game struct {
	ApplicationConfig *ApplicationConfig
	SystemManager     *systems.SystemManager
	State             interface{}
	FnBoot            Boot
	FnInitialize      Initialize
	FnUpdate          Update
	FnRender          Render
	FnOnResize        OnResize
	FnShutdown        Shutdown
}

type Initialize

type Initialize func() error

type OnResize

type OnResize func(width uint32, height uint32) error

type Render

type Render func(packer *metadata.RenderPacket, deltaTime float64) error

type Shutdown

type Shutdown func() error

type Stage

type Stage uint8
const (
	// Engine is in an uninitialized state
	EngineStageUninitialized Stage = iota
	// Engine is currently booting up
	EngineStageBooting
	// Engine completed boot process and is ready to be initialized
	EngineStageBootComplete
	// Engine is currently initializing
	EngineStageInitializing
	// Engine initialization is complete
	EngineStageInitialized
	// Engine is currently running
	EngineStageRunning
	// Engine is in the process of shutting down
	EngineStageShuttingDown
)

type Update

type Update func(deltaTime float64) error

Directories

Path Synopsis
renderer

Jump to

Keyboard shortcuts

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