package
Version:
v0.0.0-...-fd97e0e
Opens a new window with list of versions in this module.
Published: Mar 16, 2016
License: Apache-2.0, BSD-3-Clause
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package glutil implements OpenGL utility functions.
CreateProgram creates, compiles, and links a gl.Program.
Image bridges between an *image.RGBA and an OpenGL texture.
The contents of the *image.RGBA can be uploaded as a texture and drawn as a
2D quad.
The number of active Images must fit in the system's OpenGL texture limit.
The typical use of an Image is as a texture atlas.
Draw draws the srcBounds part of the image onto a parallelogram, defined by
three of its corners, in the current GL framebuffer.
func (img *Image) Release()
Release invalidates the Image and removes any underlying data structures.
The Image cannot be used after being deleted.
func (img *Image) Upload()
Upload copies the host image data to the GL device.
Images maintains the shared state used by a set of *Image objects.
NewImages creates an *Images.
NewImage creates an Image of the given size.
Both a host-memory *image.RGBA and a GL texture are created.
Release releases any held OpenGL resources.
All *Image objects must be released first, or this function panics.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.