glc

package
v0.0.0-...-2907895 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUF_STREAM_DRAW  = gl.STREAM_DRAW
	BUF_STREAM_READ  = gl.STREAM_READ
	BUF_STREAM_COPY  = gl.STREAM_COPY
	BUF_STATIC_DRAW  = gl.STATIC_DRAW
	BUF_STATIC_READ  = gl.STATIC_READ
	BUF_STATIC_COPY  = gl.STATIC_COPY
	BUF_DYNAMIC_DRAW = gl.DYNAMIC_DRAW
	BUF_DYNAMIC_READ = gl.DYNAMIC_READ
	BUF_DYNAMIC_COPY = gl.DYNAMIC_COPY
)

usage flags

View Source
const (
	MAP_READ       = gl.MAP_READ_BIT
	MAP_WRITE      = gl.MAP_WRITE_BIT
	MAP_PERSISTENT = gl.MAP_PERSISTENT_BIT
	MAP_COHERENT   = gl.MAP_COHERENT_BIT

	MAP_INVALIDATE_RANGE  = gl.MAP_INVALIDATE_RANGE_BIT
	MAP_INVALIDATE_BUFFER = gl.MAP_INVALIDATE_BUFFER_BIT
	MAP_FLUSH_EXPLICIT    = gl.MAP_FLUSH_EXPLICIT_BIT
	MAP_UNSYNCHRONIZED    = gl.MAP_UNSYNCHRONIZED_BIT
)

access flags

Variables

This section is empty.

Functions

func Barrier

func Barrier()

func Flush

func Flush()

func Init

func Init()

func Sync

func Sync()

Types

type Buffer

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

func LoadBufferAtomic

func LoadBufferAtomic(sourceSlicePtr interface{}, usageHint uint32) *Buffer

func LoadBufferStorage

func LoadBufferStorage(sourceSlicePtr interface{}, usageHint uint32) *Buffer

func LoadBufferUniform

func LoadBufferUniform(sourceSlicePtr interface{}, usageHint uint32) *Buffer

func NewBufferAtomic

func NewBufferAtomic(length int, elemSize uintptr, usageHint uint32) *Buffer

func NewBufferStorage

func NewBufferStorage(length int, elemSize uintptr, usageHint uint32) *Buffer

func NewBufferUniform

func NewBufferUniform(length int, elemSize uintptr, usageHint uint32) *Buffer

func (*Buffer) Bind

func (b *Buffer) Bind(slot uint32)

func (*Buffer) Delete

func (b *Buffer) Delete()

func (*Buffer) Download

func (b *Buffer) Download(slicePtr interface{})

func (*Buffer) Map

func (b *Buffer) Map(slicePtr interface{}, accessFlags uint32)

func (*Buffer) MapRange

func (b *Buffer) MapRange(slicePtr interface{}, offset, length int, accessFlags uint32)

func (*Buffer) Ready

func (b *Buffer) Ready() bool

func (*Buffer) Unmap

func (b *Buffer) Unmap() bool

func (*Buffer) Upload

func (b *Buffer) Upload(slicePtr interface{})

type Program

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

func LoadProgram

func LoadProgram(path string) *Program

func NewProgram

func NewProgram() *Program

func (Program) Call

func (p Program) Call(x, y, z uint32, args ...*Buffer)

func (*Program) Delete

func (p *Program) Delete()

func (Program) Dispatch

func (p Program) Dispatch(x, y, z uint32)

func (*Program) LinkShader

func (p *Program) LinkShader(shader *Shader) error

func (*Program) LoadSrc

func (p *Program) LoadSrc(path string) error

func (*Program) Ready

func (p *Program) Ready() bool

type Shader

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

func NewShader

func NewShader() *Shader

func (*Shader) CompileFile

func (s *Shader) CompileFile(path string) error

func (*Shader) CompileStr

func (s *Shader) CompileStr(source string) error

func (*Shader) Delete

func (s *Shader) Delete()

func (*Shader) Ready

func (s *Shader) Ready() bool

Jump to

Keyboard shortcuts

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