graphics

package
v0.0.0-...-7483609 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package graphics Defines a Window type used to create and control a glfw window with an opengl context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Window

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

Window stores all the values needed to create and work with a window.

func CreateWindow

func CreateWindow() *Window

CreateWindow creates a window correctly.

func (*Window) Clear

func (w *Window) Clear()

Clear clears the screen.

func (*Window) Closed

func (w *Window) Closed() bool

Closed returns if this window has been closed.

func (*Window) PollEvents

func (w *Window) PollEvents()

PollEvents polls the window events, should be called at the end of every update iteration.

func (*Window) SetKeyCallback

func (w *Window) SetKeyCallback(f func(w *glfw.Window, key glfw.Key, code int, action glfw.Action, mods glfw.ModifierKey))

SetKeyCallback sets the current key callback on the window.

func (*Window) SwapBuffers

func (w *Window) SwapBuffers()

SwapBuffers swaps the window buffers, should be called at the end of every render iteration.

Directories

Path Synopsis
Package render camera.go Defines a camera type used to control the opengl viewport.
Package render camera.go Defines a camera type used to control the opengl viewport.
Package shader shaderprogram.go Defines a shader type that will be used by opengl.
Package shader shaderprogram.go Defines a shader type that will be used by opengl.

Jump to

Keyboard shortcuts

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