graphicscommand

package
v1.10.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package graphicscommand represents a low layer for graphics using OpenGL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Driver

func Error

func Error() error

Error returns an OpenGL error for the last command.

func FlushCommands

func FlushCommands()

FlushCommands flushes the command queue.

func ResetGraphicsDriverState

func ResetGraphicsDriverState() error

ResetGraphicsDriverState resets or initializes the current graphics driver state.

Types

type Image

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

Image represents an image that is implemented with OpenGL.

func NewImage

func NewImage(width, height int) *Image

NewImage returns a new image.

Note that the image is not initialized yet.

func NewScreenFramebufferImage

func NewScreenFramebufferImage(width, height int) *Image

func (*Image) CopyPixels

func (i *Image) CopyPixels(src *Image)

CopyPixels is basically same as Pixels and ReplacePixels, but reading pixels from GPU is done lazily.

func (*Image) Dispose

func (i *Image) Dispose()

func (*Image) DrawImage

func (i *Image) DrawImage(src *Image, vertices []float32, indices []uint16, clr *affine.ColorM, mode graphics.CompositeMode, filter graphics.Filter, address graphics.Address)

func (*Image) IsInvalidated

func (i *Image) IsInvalidated() bool

func (*Image) Pixels

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

Pixels returns the image's pixels. Pixels might return nil when OpenGL error happens.

func (*Image) ReplacePixels

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

func (*Image) Size

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

Jump to

Keyboard shortcuts

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