Documentation ¶
Index ¶
- type BeginMode
- type Buffer
- type BufferTarget
- type Canvas
- type ClearBufferMask
- type Context
- func (gl *Context) AttachShader(prog *Program, shader *Shader)
- func (gl *Context) BindBuffer(target BufferTarget, buffer *Buffer)
- func (gl *Context) BufferData(target BufferTarget, data interface{}, usage Usage)
- func (gl *Context) Clear(mask ClearBufferMask)
- func (gl *Context) ClearColor(r float64, g float64, b float64, a float64)
- func (gl *Context) CompileShader(shader *Shader)
- func (gl *Context) CreateBuffer(target BufferTarget) *Buffer
- func (gl *Context) CreateProgram() *Program
- func (gl *Context) CreateShader(sType Shaders) *Shader
- func (gl *Context) DrawElements(mode BeginMode, count uint, dtype DataType, offset uint)
- func (gl *Context) Enable(cap EnableCap)
- func (gl *Context) EnableVertexAttribArray(loc *Location)
- func (gl *Context) GetAttribLocation(prog *Program, attr string) *Location
- func (gl *Context) LinkProgram(prog *Program)
- func (gl *Context) ShaderSource(shader *Shader, source string)
- func (gl *Context) UseProgram(prog *Program)
- func (gl *Context) VertexAttribPointer(loc *Location, size uint, dtype DataType, normalized bool, stride uint, ...)
- func (gl *Context) Viewport(x uint, y uint, width uint, height uint)
- type DataType
- type EnableCap
- type Location
- type Program
- type Shader
- type Shaders
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferTarget ¶
type BufferTarget uint
const ( ARRAY_BUFFER BufferTarget = 0x8892 ELEMENT_ARRAY_BUFFER BufferTarget = 0x8893 ARRAY_BUFFER_BINDING BufferTarget = 0x8894 ELEMENT_ARRAY_BUFFER_BINDING BufferTarget = 0x8895 )
type Canvas ¶
func CreateCanvasAt ¶
type ClearBufferMask ¶
type ClearBufferMask uint
const ( DEPTH_BUFFER_BIT ClearBufferMask = 0x00000100 STENCIL_BUFFER_BIT ClearBufferMask = 0x00000400 COLOR_BUFFER_BIT ClearBufferMask = 0x00004000 )
type Context ¶
func GetContext ¶
func (*Context) AttachShader ¶
func (*Context) BindBuffer ¶
func (gl *Context) BindBuffer(target BufferTarget, buffer *Buffer)
func (*Context) BufferData ¶
func (gl *Context) BufferData(target BufferTarget, data interface{}, usage Usage)
func (*Context) Clear ¶
func (gl *Context) Clear(mask ClearBufferMask)
func (*Context) ClearColor ¶
func (*Context) CompileShader ¶
func (*Context) CreateBuffer ¶
func (gl *Context) CreateBuffer(target BufferTarget) *Buffer
func (*Context) CreateProgram ¶
func (*Context) CreateShader ¶
func (*Context) DrawElements ¶
func (*Context) EnableVertexAttribArray ¶
func (*Context) GetAttribLocation ¶
func (*Context) LinkProgram ¶
func (*Context) ShaderSource ¶
func (*Context) UseProgram ¶
func (*Context) VertexAttribPointer ¶
type EnableCap ¶
type EnableCap uint
const ( CULL_FACE EnableCap = 0x0B44 BLEND EnableCap = 0x0BE2 DITHER EnableCap = 0x0BD0 STENCIL_TEST EnableCap = 0x0B90 DEPTH_TEST EnableCap = 0x0B71 SCISSOR_TEST EnableCap = 0x0C11 POLYGON_OFFSET_FILL EnableCap = 0x8037 SAMPLE_ALPHA_TO_COVERAGE EnableCap = 0x809E SAMPLE_COVERAGE EnableCap = 0x80A0 )
EnableCap TEXTURE_2D
type Shaders ¶
type Shaders uint
const ( FRAGMENT_SHADER Shaders = 0x8B30 VERTEX_SHADER Shaders = 0x8B31 MAX_VERTEX_ATTRIBS Shaders = 0x8869 MAX_VERTEX_UNIFORM_VECTORS Shaders = 0x8DFB MAX_VARYING_VECTORS Shaders = 0x8DFC MAX_COMBINED_TEXTURE_IMAGE_UNITS Shaders = 0x8B4D MAX_VERTEX_TEXTURE_IMAGE_UNITS Shaders = 0x8B4C MAX_TEXTURE_IMAGE_UNITS Shaders = 0x8872 MAX_FRAGMENT_UNIFORM_VECTORS Shaders = 0x8DFD SHADER_TYPE Shaders = 0x8B4F DELETE_STATUS Shaders = 0x8B80 LINK_STATUS Shaders = 0x8B82 VALIDATE_STATUS Shaders = 0x8B83 ATTACHED_SHADERS Shaders = 0x8B85 ACTIVE_UNIFORMS Shaders = 0x8B86 ACTIVE_ATTRIBUTES Shaders = 0x8B89 SHADING_LANGUAGE_VERSION Shaders = 0x8B8C CURRENT_PROGRAM Shaders = 0x8B8D )
Click to show internal directories.
Click to hide internal directories.