resource

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Vertices []float32
	Indices  []uint32
	Stripes  []int
	// contains filtered or unexported fields
}

func NewModel

func NewModel() *Model

func (*Model) Active

func (m *Model) Active()

func (*Model) ReadFromFile

func (m *Model) ReadFromFile(path string)

func (*Model) Upload

func (m *Model) Upload()

to gpu

type ShaderProgram

type ShaderProgram struct {
	VertexCode   string
	FragmentCode string
	// contains filtered or unexported fields
}

func NewShaderProgram

func NewShaderProgram() *ShaderProgram

func (*ShaderProgram) Active

func (sp *ShaderProgram) Active()

func (*ShaderProgram) ReadFromFile

func (sp *ShaderProgram) ReadFromFile(vPath, fPath string)

func (*ShaderProgram) ShaderProgram

func (sp *ShaderProgram) ShaderProgram() uint32

get the shader program

func (*ShaderProgram) Upload

func (sp *ShaderProgram) Upload()

to gpu

type Texture

type Texture struct {
	RepeatModeU int
	RepeatModeV int
	FlipY       bool
	GenMipMaps  bool
	Pixels      []uint8
	// contains filtered or unexported fields
}

func NewTexture

func NewTexture() *Texture

func (*Texture) Active

func (t *Texture) Active()

func (*Texture) ReadFromFile

func (t *Texture) ReadFromFile(path string)

func (*Texture) SetFormat

func (t *Texture) SetFormat(f int)

func (*Texture) SetHeight

func (t *Texture) SetHeight(h int32)

func (*Texture) SetWidth

func (t *Texture) SetWidth(w int32)

func (*Texture) Upload

func (t *Texture) Upload()

to gpu

Jump to

Keyboard shortcuts

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