graphics

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextPowerOf2Int added in v1.2.0

func NextPowerOf2Int(x int) int

Types

type Framebuffer

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

func NewFramebufferFromTexture

func NewFramebufferFromTexture(c *opengl.Context, texture *Texture) (*Framebuffer, error)

func NewZeroFramebuffer

func NewZeroFramebuffer(c *opengl.Context, width, height int) (*Framebuffer, error)

func (*Framebuffer) Dispose

func (f *Framebuffer) Dispose(c *opengl.Context)

func (*Framebuffer) DrawTexture

func (f *Framebuffer) DrawTexture(c *opengl.Context, t *Texture, quads TextureQuads, geo, clr Matrix) error

func (*Framebuffer) Fill

func (f *Framebuffer) Fill(c *opengl.Context, clr color.Color) error

func (*Framebuffer) Pixels

func (f *Framebuffer) Pixels(c *opengl.Context) ([]uint8, error)

func (*Framebuffer) Size

func (f *Framebuffer) Size() (width, height int)

type Lines added in v1.2.0

type Lines interface {
	Len() int
	Points(i int) (x0, y0, x1, y1 int)
	Color(i int) color.Color
}

type Matrix

type Matrix interface {
	Element(i, j int) float64
}

type Rects added in v1.2.0

type Rects interface {
	Len() int
	Rect(i int) (x, y, width, height int)
	Color(i int) color.Color
}

type Texture

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

func NewTexture

func NewTexture(c *opengl.Context, width, height int, filter opengl.Filter) (*Texture, error)

func NewTextureFromImage

func NewTextureFromImage(c *opengl.Context, img image.Image, filter opengl.Filter) (*Texture, error)

func (*Texture) Dispose

func (t *Texture) Dispose(c *opengl.Context)

func (*Texture) ReplacePixels added in v1.2.0

func (t *Texture) ReplacePixels(c *opengl.Context, p []uint8) error

func (*Texture) Size

func (t *Texture) Size() (width, height int)

type TextureQuads

type TextureQuads interface {
	Len() int
	SetVertices(vertices []int16) int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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