texture

package
v0.0.0-...-6a0c17c Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const InvalidID = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type CubeDataPlayground

type CubeDataPlayground interface {
	Size() int
	Data(side CubeSide) []byte
}

type CubeSide

type CubeSide int
const (
	CubeSideFront CubeSide = iota
	CubeSideBack
	CubeSideLeft
	CubeSideRight
	CubeSideTop
	CubeSideBottom
)

type CubeTexture

type CubeTexture struct {
	Texture
}

func NewCubeTexture

func NewCubeTexture() *CubeTexture

func (*CubeTexture) Allocate

func (t *CubeTexture) Allocate() error

func (*CubeTexture) Bind

func (t *CubeTexture) Bind()

func (*CubeTexture) CreateData

func (t *CubeTexture) CreateData(playground CubeDataPlayground)

type FlatDataPlayground

type FlatDataPlayground interface {
	Width() int
	Height() int
	Data() []byte
}

type FlatTexture

type FlatTexture struct {
	Texture
}

func NewFlatTexture

func NewFlatTexture() *FlatTexture

func (*FlatTexture) Allocate

func (t *FlatTexture) Allocate() error

func (*FlatTexture) Bind

func (t *FlatTexture) Bind()

func (*FlatTexture) CreateData

func (t *FlatTexture) CreateData(playground FlatDataPlayground)

type RGBA

type RGBA struct {
	R byte
	G byte
	B byte
	A byte
}

type RGBACubeDataPlayground

type RGBACubeDataPlayground interface {
	CubeDataPlayground
	SetTexel(side CubeSide, x, y int, rgba RGBA)
	Texel(side CubeSide, x, y int) RGBA
	SetData(side CubeSide, data []byte)
}

func DedicatedRGBACubeDataPlayground

func DedicatedRGBACubeDataPlayground(size int) RGBACubeDataPlayground

type RGBAFlatDataPlayground

type RGBAFlatDataPlayground interface {
	FlatDataPlayground
	SetTexel(x, y int, rgba RGBA)
	Texel(x, y int) RGBA
	SetData([]byte)
}

func DedicatedRGBAFlatDataPlayground

func DedicatedRGBAFlatDataPlayground(width, height int) RGBAFlatDataPlayground

type Texture

type Texture struct {
	ID uint32
}

func DefaultTexture

func DefaultTexture() Texture

func (*Texture) Allocate

func (t *Texture) Allocate() error

func (*Texture) Release

func (t *Texture) Release()

Jump to

Keyboard shortcuts

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