Index | Files

package gl

import ""


Package Files

functions.go gl.go srgb.go types.go util.go


const (
    ARRAY_BUFFER                          = 0x8892
    BLEND                                 = 0xbe2
    CLAMP_TO_EDGE                         = 0x812f
    COLOR_ATTACHMENT0                     = 0x8ce0
    COLOR_BUFFER_BIT                      = 0x4000
    COMPILE_STATUS                        = 0x8b81
    DEPTH_BUFFER_BIT                      = 0x100
    DEPTH_ATTACHMENT                      = 0x8d00
    DEPTH_COMPONENT16                     = 0x81a5
    DEPTH_TEST                            = 0xb71
    DST_COLOR                             = 0x306
    ELEMENT_ARRAY_BUFFER                  = 0x8893
    EXTENSIONS                            = 0x1f03
    FLOAT                                 = 0x1406
    FRAGMENT_SHADER                       = 0x8b30
    FRAMEBUFFER                           = 0x8d40
    FRAMEBUFFER_BINDING                   = 0x8ca6
    FRAMEBUFFER_COMPLETE                  = 0x8cd5
    HALF_FLOAT                            = 0x140b
    HALF_FLOAT_OES                        = 0x8d61
    INFO_LOG_LENGTH                       = 0x8B84
    GREATER                               = 0x204
    LINEAR                                = 0x2601
    LINK_STATUS                           = 0x8b82
    LUMINANCE                             = 0x1909
    MAX_TEXTURE_SIZE                      = 0xd33
    NEAREST                               = 0x2600
    NO_ERROR                              = 0x0
    NUM_EXTENSIONS                        = 0x821D
    ONE                                   = 0x1
    ONE_MINUS_SRC_ALPHA                   = 0x303
    QUERY_RESULT                          = 0x8866
    QUERY_RESULT_AVAILABLE                = 0x8867
    R16F                                  = 0x822d
    R8                                    = 0x8229
    READ_FRAMEBUFFER                      = 0x8ca8
    RED                                   = 0x1903
    RENDERER                              = 0x1F01
    RENDERBUFFER                          = 0x8d41
    RENDERBUFFER_BINDING                  = 0x8ca7
    RENDERBUFFER_HEIGHT                   = 0x8d43
    RENDERBUFFER_WIDTH                    = 0x8d42
    RGB                                   = 0x1907
    RGBA                                  = 0x1908
    RGBA8                                 = 0x8058
    SHORT                                 = 0x1402
    SRGB                                  = 0x8c40
    SRGB_ALPHA_EXT                        = 0x8c42
    SRGB8                                 = 0x8c41
    SRGB8_ALPHA8                          = 0x8c43
    STATIC_DRAW                           = 0x88e4
    TEXTURE_2D                            = 0xde1
    TEXTURE_MAG_FILTER                    = 0x2800
    TEXTURE_MIN_FILTER                    = 0x2801
    TEXTURE_WRAP_S                        = 0x2802
    TEXTURE_WRAP_T                        = 0x2803
    TEXTURE0                              = 0x84c0
    TEXTURE1                              = 0x84c1
    TRIANGLE_STRIP                        = 0x5
    TRIANGLES                             = 0x4
    UNPACK_ALIGNMENT                      = 0xcf5
    UNSIGNED_BYTE                         = 0x1401
    UNSIGNED_SHORT                        = 0x1403
    VERSION                               = 0x1f02
    VERTEX_SHADER                         = 0x8b31
    ZERO                                  = 0x0

    // EXT_disjoint_timer_query

func BytesView Uses

func BytesView(s interface{}) []byte

BytesView returns a byte slice view of a slice.

func GoString Uses

func GoString(s []byte) string

GoString convert a NUL-terminated C string to a Go string.

func ParseGLVersion Uses

func ParseGLVersion(glVer string) ([2]int, error)

func SliceOf Uses

func SliceOf(s uintptr) []byte

type Attrib Uses

type Attrib uint

type Buffer Uses

type Buffer struct{ V uint }

type Enum Uses

type Enum uint

type Framebuffer Uses

type Framebuffer struct{ V uint }

type Functions Uses

type Functions struct {
    // contains filtered or unexported fields

func (*Functions) ActiveTexture Uses

func (f *Functions) ActiveTexture(texture Enum)

func (*Functions) AttachShader Uses

func (f *Functions) AttachShader(p Program, s Shader)

func (*Functions) BeginQuery Uses

func (f *Functions) BeginQuery(target Enum, query Query)

func (*Functions) BindAttribLocation Uses

func (f *Functions) BindAttribLocation(p Program, a Attrib, name string)

func (*Functions) BindBuffer Uses

func (f *Functions) BindBuffer(target Enum, b Buffer)

func (*Functions) BindFramebuffer Uses

func (f *Functions) BindFramebuffer(target Enum, fb Framebuffer)

func (*Functions) BindRenderbuffer Uses

func (f *Functions) BindRenderbuffer(target Enum, fb Renderbuffer)

func (*Functions) BindTexture Uses

func (f *Functions) BindTexture(target Enum, t Texture)

func (*Functions) BlendEquation Uses

func (f *Functions) BlendEquation(mode Enum)

func (*Functions) BlendFunc Uses

func (f *Functions) BlendFunc(sfactor, dfactor Enum)

func (*Functions) BufferData Uses

func (f *Functions) BufferData(target Enum, src []byte, usage Enum)

func (*Functions) CheckFramebufferStatus Uses

func (f *Functions) CheckFramebufferStatus(target Enum) Enum

func (*Functions) Clear Uses

func (f *Functions) Clear(mask Enum)

func (*Functions) ClearColor Uses

func (f *Functions) ClearColor(red float32, green float32, blue float32, alpha float32)

func (*Functions) ClearDepthf Uses

func (f *Functions) ClearDepthf(d float32)

func (*Functions) CompileShader Uses

func (f *Functions) CompileShader(s Shader)

func (*Functions) CreateBuffer Uses

func (f *Functions) CreateBuffer() Buffer

func (*Functions) CreateFramebuffer Uses

func (f *Functions) CreateFramebuffer() Framebuffer

func (*Functions) CreateProgram Uses

func (f *Functions) CreateProgram() Program

func (*Functions) CreateQuery Uses

func (f *Functions) CreateQuery() Query

func (*Functions) CreateRenderbuffer Uses

func (f *Functions) CreateRenderbuffer() Renderbuffer

func (*Functions) CreateShader Uses

func (f *Functions) CreateShader(ty Enum) Shader

func (*Functions) CreateTexture Uses

func (f *Functions) CreateTexture() Texture

func (*Functions) DeleteBuffer Uses

func (f *Functions) DeleteBuffer(v Buffer)

func (*Functions) DeleteFramebuffer Uses

func (f *Functions) DeleteFramebuffer(v Framebuffer)

func (*Functions) DeleteProgram Uses

func (f *Functions) DeleteProgram(p Program)

func (*Functions) DeleteQuery Uses

func (f *Functions) DeleteQuery(query Query)

func (*Functions) DeleteRenderbuffer Uses

func (f *Functions) DeleteRenderbuffer(v Renderbuffer)

func (*Functions) DeleteShader Uses

func (f *Functions) DeleteShader(s Shader)

func (*Functions) DeleteTexture Uses

func (f *Functions) DeleteTexture(v Texture)

func (*Functions) DepthFunc Uses

func (f *Functions) DepthFunc(v Enum)

func (*Functions) DepthMask Uses

func (f *Functions) DepthMask(mask bool)

func (*Functions) Disable Uses

func (f *Functions) Disable(cap Enum)

func (*Functions) DisableVertexAttribArray Uses

func (f *Functions) DisableVertexAttribArray(a Attrib)

func (*Functions) DrawArrays Uses

func (f *Functions) DrawArrays(mode Enum, first int, count int)

func (*Functions) DrawElements Uses

func (f *Functions) DrawElements(mode Enum, count int, ty Enum, offset int)

func (*Functions) Enable Uses

func (f *Functions) Enable(cap Enum)

func (*Functions) EnableVertexAttribArray Uses

func (f *Functions) EnableVertexAttribArray(a Attrib)

func (*Functions) EndQuery Uses

func (f *Functions) EndQuery(target Enum)

func (*Functions) Finish Uses

func (f *Functions) Finish()

func (*Functions) FramebufferRenderbuffer Uses

func (f *Functions) FramebufferRenderbuffer(target, attachment, renderbuffertarget Enum, renderbuffer Renderbuffer)

func (*Functions) FramebufferTexture2D Uses

func (f *Functions) FramebufferTexture2D(target, attachment, texTarget Enum, t Texture, level int)

func (*Functions) GetBinding Uses

func (c *Functions) GetBinding(pname Enum) Object

func (*Functions) GetError Uses

func (f *Functions) GetError() Enum

func (*Functions) GetFramebufferAttachmentParameteri Uses

func (f *Functions) GetFramebufferAttachmentParameteri(target, attachment, pname Enum) int

func (*Functions) GetInteger Uses

func (f *Functions) GetInteger(pname Enum) int

func (*Functions) GetProgramInfoLog Uses

func (f *Functions) GetProgramInfoLog(p Program) string

func (*Functions) GetProgrami Uses

func (f *Functions) GetProgrami(p Program, pname Enum) int

func (*Functions) GetQueryObjectuiv Uses

func (f *Functions) GetQueryObjectuiv(query Query, pname Enum) uint

func (*Functions) GetRenderbufferParameteri Uses

func (f *Functions) GetRenderbufferParameteri(target, pname Enum) int

func (*Functions) GetShaderInfoLog Uses

func (f *Functions) GetShaderInfoLog(s Shader) string

func (*Functions) GetShaderi Uses

func (f *Functions) GetShaderi(s Shader, pname Enum) int

func (*Functions) GetString Uses

func (f *Functions) GetString(pname Enum) string

func (*Functions) GetStringi Uses

func (f *Functions) GetStringi(pname Enum, index int) string

func (*Functions) GetUniformLocation Uses

func (f *Functions) GetUniformLocation(p Program, name string) Uniform

func (*Functions) InvalidateFramebuffer Uses

func (f *Functions) InvalidateFramebuffer(target, attachment Enum)

func (*Functions) LinkProgram Uses

func (f *Functions) LinkProgram(p Program)

func (*Functions) PixelStorei Uses

func (f *Functions) PixelStorei(pname Enum, param int32)

func (*Functions) ReadPixels Uses

func (f *Functions) ReadPixels(x, y, width, height int, format, ty Enum, data []byte)

func (*Functions) RenderbufferStorage Uses

func (f *Functions) RenderbufferStorage(target, internalformat Enum, width, height int)

func (*Functions) Scissor Uses

func (f *Functions) Scissor(x, y, width, height int32)

func (*Functions) ShaderSource Uses

func (f *Functions) ShaderSource(s Shader, src string)

func (*Functions) TexImage2D Uses

func (f *Functions) TexImage2D(target Enum, level int, internalFormat int, width int, height int, format Enum, ty Enum, data []byte)

func (*Functions) TexParameteri Uses

func (f *Functions) TexParameteri(target, pname Enum, param int)

func (*Functions) TexSubImage2D Uses

func (f *Functions) TexSubImage2D(target Enum, level int, x int, y int, width int, height int, format Enum, ty Enum, data []byte)

func (*Functions) Uniform1f Uses

func (f *Functions) Uniform1f(dst Uniform, v float32)

func (*Functions) Uniform1i Uses

func (f *Functions) Uniform1i(dst Uniform, v int)

func (*Functions) Uniform2f Uses

func (f *Functions) Uniform2f(dst Uniform, v0 float32, v1 float32)

func (*Functions) Uniform3f Uses

func (f *Functions) Uniform3f(dst Uniform, v0 float32, v1 float32, v2 float32)

func (*Functions) Uniform4f Uses

func (f *Functions) Uniform4f(dst Uniform, v0 float32, v1 float32, v2 float32, v3 float32)

func (*Functions) UseProgram Uses

func (f *Functions) UseProgram(p Program)

func (*Functions) VertexAttribPointer Uses

func (f *Functions) VertexAttribPointer(dst Attrib, size int, ty Enum, normalized bool, stride int, offset int)

func (*Functions) Viewport Uses

func (f *Functions) Viewport(x int, y int, width int, height int)

type Object Uses

type Object struct{ V uint }

type Program Uses

type Program struct{ V uint }

func CreateProgram Uses

func CreateProgram(ctx *Functions, vsSrc, fsSrc string, attribs []string) (Program, error)

func (Program) Valid Uses

func (p Program) Valid() bool

type Query Uses

type Query struct{ V uint }

type Renderbuffer Uses

type Renderbuffer struct{ V uint }

type SRGBFBO Uses

type SRGBFBO struct {
    // contains filtered or unexported fields

SRGBFBO implements an intermediate sRGB FBO for gamma-correct rendering on platforms without sRGB enabled native framebuffers.

func NewSRGBFBO Uses

func NewSRGBFBO(f *Functions) (*SRGBFBO, error)

func (*SRGBFBO) AfterPresent Uses

func (s *SRGBFBO) AfterPresent()

func (*SRGBFBO) Blit Uses

func (s *SRGBFBO) Blit()

func (*SRGBFBO) Refresh Uses

func (s *SRGBFBO) Refresh(w, h int) error

func (*SRGBFBO) Release Uses

func (s *SRGBFBO) Release()

type Shader Uses

type Shader struct{ V uint }

func (Shader) Valid Uses

func (s Shader) Valid() bool

type Texture Uses

type Texture struct{ V uint }

func (Texture) Equal Uses

func (t Texture) Equal(t2 Texture) bool

func (Texture) Valid Uses

func (t Texture) Valid() bool

type Uniform Uses

type Uniform struct{ V int }

func GetUniformLocation Uses

func GetUniformLocation(ctx *Functions, prog Program, name string) Uniform

func (Uniform) Valid Uses

func (u Uniform) Valid() bool

Package gl imports 7 packages (graph) and is imported by 6 packages. Updated 2020-01-20. Refresh now. Tools for package owners.