Documentation
¶
Index ¶
Constants ¶
const Build = build.BuildRelease
Variables ¶
This section is empty.
Functions ¶
func Running ¶
func Running() bool
Running reports whether the engine is considered to still be running. It will only return true when the main loop is running and before shutdown confirmation from Program.Shutdown(). This is so that you can depend on Running() to terminate your loops/threads.
SIGINT will bypass Program.Shutdown() and force a terminate. This is so we have a easy way to terminate the engine in the event of deadlocks.
Types ¶
type Audio ¶
type Audio interface {
AudioConfig() AudioConfig
Init(PlatformInterface, AudioConfig) error
Mix() (int, audio.Track)
Update()
Destroy()
}
type AudioConfig ¶
Refer to driver's documentation on the valid value ranges
type GLInstance ¶
type GLInstance interface {
ProcAddr() uintptr
SwapBuffers()
}
type GLRenderer ¶
type GLRenderer interface {
Renderer
GLConfig() GLConfig
GLInit(PlatformInterface, GLInstance) error
}
type PlatformInterface ¶
type PlatformInterface interface {
// Abort terminates the application and potentially creates a dump.
// May be implemented with a panic().
Abort()
// AbortPopup displays a popup in a platform specific manner, visually indicating an error to the user.
// Then terminates the application and potentially creates a dump.
// May be implemented with a panic().
AbortPopup(string, ...interface{})
}
PlatformInterface defines a set of functions all Platforms must support, this is to facilitate the creation of packages that only requires basic functionality without having a dependency on a specific Platform package.
type Program ¶
type Program interface {
Init(PlatformInterface) error
Update(float64)
Shutdown() bool
Destroy()
}
type VkInstance ¶
type VkRenderer ¶
type VkRenderer interface {
Renderer
VkConfig() VkConfig
VkInit(PlatformInterface, VkInstance) error
}