Documentation
¶
Overview ¶
Package startup provides a runtime for connecting to the graphics engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Loader
deprecated
func Loader()
Deprecated: Use LoadingScene instead.
func LoadingScene ¶
func LoadingScene()
LoadingScene starts up loading the main scene after this function is called, all graphics functions will be available to use.
A subsequent call to Scene is required to startup the scene.
Blocks indefinitely if the editor is running. As such, make sure to register all editor-accessible classes before calling this function if you want them to be available in the editor.
func MainLoop ¶
func MainLoop(loop MainLoopClass.Interface)
MainLoop uses the given struct as the main loop implementation. This will take care of initialising the Go runtime correctly, blocks until the main loop has shutdown.
func Pin ¶
func Pin[T any](val T) T
Pin the given value to the lifetime of the program, preventing the underlying pointer from expiring, can only be called during initialization.
func Rendering ¶
Rendering waits for the engine to startup and returns a frame iterator for the primary viewport that is ready for rendering. The iterator will block until the engine shuts down.
func main() { frames := startup.Rendering() // init. for frame := range frames { // render frame } // finalize }