Documentation ¶
Overview ¶
Package engine provides an abstraction layer on top of OpenGL. It contains entities relevant for rendering.
Index ¶
- type Window
- func (window *Window) Close()
- func (window *Window) GetFPS() float64
- func (window *Window) GetFPSFormatted() string
- func (window *Window) LockFPS(fps float64)
- func (window *Window) RunMainLoop(render func())
- func (window *Window) SetClearColor(r, g, b float32)
- func (window *Window) SetTitle(title string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Window ¶
type Window struct { Window *glfw.Window Width int Height int // contains filtered or unexported fields }
Window takes care of window creation and interaction.
func New ¶
NewWindow returns a pointer to a Window with the specified window title and window width and height.
func (*Window) GetFPSFormatted ¶
GetFPSFormatted returns the fps as formatted string.
func (*Window) LockFPS ¶
LockFPS provides an upper bound for the FPS. The fps has to be greater than zero.
func (*Window) RunMainLoop ¶
func (window *Window) RunMainLoop(render func())
RunMainLoop calls the specified render function each frame until the window is being closed.
func (*Window) SetClearColor ¶
SetClearColor updates the color used for a new frame and when clearing a FBO.
Click to show internal directories.
Click to hide internal directories.