opengl

package
v1.2.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttribLocation

type AttribLocation int32

func GetAttribLocation

func GetAttribLocation(g AttribLocationGetter, p Program, location string) AttribLocation

type AttribLocationGetter

type AttribLocationGetter interface {
	GetAttribLocation(p Program, location string) AttribLocation
}

type Buffer

type Buffer uint32

type BufferType

type BufferType int

type BufferUsage

type BufferUsage int

type Context

type Context struct {
	Nearest            Filter
	Linear             Filter
	VertexShader       ShaderType
	FragmentShader     ShaderType
	ArrayBuffer        BufferType
	ElementArrayBuffer BufferType
	DynamicDraw        BufferUsage
	StaticDraw         BufferUsage
	Triangles          Mode
	Lines              Mode
	// contains filtered or unexported fields
}

func NewContext

func NewContext() *Context

func (*Context) BindElementArrayBuffer

func (c *Context) BindElementArrayBuffer(b Buffer)

func (*Context) BindTexture

func (c *Context) BindTexture(t Texture)

func (*Context) BufferSubData

func (c *Context) BufferSubData(bufferType BufferType, data []int16)

func (*Context) Check

func (c *Context) Check()

func (*Context) DeleteFramebuffer

func (c *Context) DeleteFramebuffer(f Framebuffer)

func (*Context) DeleteShader

func (c *Context) DeleteShader(s Shader)

func (*Context) DeleteTexture

func (c *Context) DeleteTexture(t Texture)

func (*Context) DisableVertexAttribArray

func (c *Context) DisableVertexAttribArray(p Program, location string)

func (*Context) DrawElements

func (c *Context) DrawElements(mode Mode, len int)

func (*Context) EnableVertexAttribArray

func (c *Context) EnableVertexAttribArray(p Program, location string)

func (*Context) FillFramebuffer

func (c *Context) FillFramebuffer(r, g, b, a float64) error

func (*Context) FramebufferPixels

func (c *Context) FramebufferPixels(f Framebuffer, width, height int) ([]uint8, error)

func (*Context) GetAttribLocation

func (c *Context) GetAttribLocation(p Program, location string) AttribLocation

func (*Context) GetUniformLocation

func (c *Context) GetUniformLocation(p Program, location string) UniformLocation

func (*Context) GlslHighpSupported

func (c *Context) GlslHighpSupported() bool

func (*Context) NewBuffer

func (c *Context) NewBuffer(bufferType BufferType, v interface{}, bufferUsage BufferUsage) Buffer

func (*Context) NewFramebuffer

func (c *Context) NewFramebuffer(texture Texture) (Framebuffer, error)

func (*Context) NewProgram

func (c *Context) NewProgram(shaders []Shader) (Program, error)

func (*Context) NewShader

func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error)

func (*Context) NewTexture

func (c *Context) NewTexture(width, height int, pixels []uint8, filter Filter) (Texture, error)

func (*Context) SetViewport

func (c *Context) SetViewport(f Framebuffer, width, height int) error

func (*Context) TexSubImage2D

func (c *Context) TexSubImage2D(p []uint8, width, height int)

func (*Context) UniformFloats

func (c *Context) UniformFloats(p Program, location string, v []float32)

func (*Context) UniformInt

func (c *Context) UniformInt(p Program, location string, v int)

func (*Context) UseProgram

func (c *Context) UseProgram(p Program)

func (*Context) VertexAttribPointer

func (c *Context) VertexAttribPointer(p Program, location string, signed bool, normalize bool, stride int, size int, v int)

type Filter

type Filter int

type Framebuffer

type Framebuffer uint32
var ZeroFramebuffer Framebuffer = 0

type Mode

type Mode int

type Program

type Program uint32

func (Program) Equals

func (p Program) Equals(other Program) bool

TODO: Remove this after the GopherJS bug was fixed (#159)

type ProgramID

type ProgramID int

func GetProgramID

func GetProgramID(p Program) ProgramID

type Shader

type Shader uint32

type ShaderType

type ShaderType int

type Texture

type Texture uint32

type UniformLocation

type UniformLocation int32

func GetUniformLocation

func GetUniformLocation(g UniformLocationGetter, p Program, location string) UniformLocation

type UniformLocationGetter

type UniformLocationGetter interface {
	GetUniformLocation(p Program, location string) UniformLocation
}

Jump to

Keyboard shortcuts

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