Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Window ¶
type Window struct { Window *sdl.Window WindowID uint32 GLContext sdl.GLContext Backend *goglbackend.GoGLBackend Event func(event sdl.Event) MouseDown func(button, x, y int) MouseMove func(x, y int) MouseUp func(button, x, y int) MouseWheel func(x, y int) KeyDown func(scancode int, rn rune, name string) KeyUp func(scancode int, rn rune, name string) KeyChar func(rn rune) SizeChange func(w, h int) // contains filtered or unexported fields }
Window represents the opened window with GL context. The Mouse* and Key* functions can be set for callbacks
func CreateWindow ¶
CreateWindow creates a window using SDL and initializes the OpenGL context
func (*Window) Destroy ¶
func (wnd *Window) Destroy()
Destroy destroys the GL context and the window
func (*Window) FinishFrame ¶
func (wnd *Window) FinishFrame()
FinishFrame updates the FPS count and displays the frame
func (*Window) MainLoop ¶
func (wnd *Window) MainLoop(run func())
MainLoop runs a main loop and calls run on every frame
func (*Window) StartFrame ¶
StartFrame handles events and gets the window ready for rendering
Click to show internal directories.
Click to hide internal directories.