graphics

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package graphics represents a low layer for graphics using OpenGL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushCommands added in v1.4.0

func FlushCommands() error

FlushCommands flushes the command queue.

func MaxImageSize added in v1.5.0

func MaxImageSize() int

MaxImageSize returns the maximum of width/height of an image.

func QuadVertexSizeInBytes added in v1.5.0

func QuadVertexSizeInBytes() int

QuadVertexSizeInBytes returns the size in bytes of vertices for a quadrangle.

func ResetGLState added in v1.6.0

func ResetGLState() error

ResetGLState resets or initializes the current OpenGL state.

Types

type Filter added in v1.6.0

type Filter int
const (
	FilterDefault Filter = iota
	FilterNearest
	FilterLinear
	FilterScreen
)

type Image added in v1.4.0

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

Image represents an image that is implemented with OpenGL.

func NewImage added in v1.4.0

func NewImage(width, height int) *Image

func NewScreenFramebufferImage added in v1.4.0

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) Dispose added in v1.4.0

func (i *Image) Dispose()

func (*Image) DrawImage added in v1.4.0

func (i *Image) DrawImage(src *Image, vertices []float32, clr *affine.ColorM, mode opengl.CompositeMode, filter Filter)

func (*Image) IsInvalidated added in v1.4.0

func (i *Image) IsInvalidated() bool

func (*Image) Pixels added in v1.4.0

func (i *Image) Pixels() ([]byte, error)

func (*Image) ReplacePixels added in v1.4.0

func (i *Image) ReplacePixels(p []byte, x, y, width, height int)

func (*Image) Size added in v1.4.0

func (i *Image) Size() (int, int)

Jump to

Keyboard shortcuts

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