opengl

package
v0.0.0-...-0f9c8cb Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VertexPosition = VBOAttributeType(iota)
	VertexColor
	VertexTexCoord

	NumVertexAttributes
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Program

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

func NewProgram

func NewProgram() *Program

func (*Program) GetAttribLocation

func (p *Program) GetAttribLocation(name string) int32

func (*Program) ID

func (p *Program) ID() uint32

type State

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

func InitOpenGL

func InitOpenGL() *State

func (*State) Program

func (s *State) Program() *Program

type VBO

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

func NewVBO

func NewVBO(buffers [NumVertexAttributes][]float32) *VBO

func (*VBO) AddAttribute

func (vbo *VBO) AddAttribute(t VBOAttributeType) *VBO

func (*VBO) Load

func (vbo *VBO) Load(gls *State)

type VBOAttribute

type VBOAttribute struct {
	Type        VBOAttributeType
	Name        string
	NumElements int32
	ByteOffset  uint32
	ElementType uint32
}

type VBOAttributeType

type VBOAttributeType int

Jump to

Keyboard shortcuts

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