gl

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT, Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACTIVE_TEXTURE                        = 0x84E0
	ALL_BARRIER_BITS                      = 0xffffffff
	ARRAY_BUFFER                          = 0x8892
	ARRAY_BUFFER_BINDING                  = 0x8894
	BACK                                  = 0x0405
	BLEND                                 = 0xbe2
	BLEND_DST_RGB                         = 0x80C8
	BLEND_SRC_RGB                         = 0x80C9
	BLEND_DST_ALPHA                       = 0x80CA
	BLEND_SRC_ALPHA                       = 0x80CB
	CLAMP_TO_EDGE                         = 0x812f
	COLOR_ATTACHMENT0                     = 0x8ce0
	COLOR_BUFFER_BIT                      = 0x4000
	COLOR_CLEAR_VALUE                     = 0x0C22
	COMPILE_STATUS                        = 0x8b81
	COMPUTE_SHADER                        = 0x91B9
	CURRENT_PROGRAM                       = 0x8B8D
	DEPTH_ATTACHMENT                      = 0x8d00
	DEPTH_BUFFER_BIT                      = 0x100
	DEPTH_CLEAR_VALUE                     = 0x0B73
	DEPTH_COMPONENT16                     = 0x81a5
	DEPTH_COMPONENT24                     = 0x81A6
	DEPTH_COMPONENT32F                    = 0x8CAC
	DEPTH_FUNC                            = 0x0B74
	DEPTH_TEST                            = 0xb71
	DEPTH_WRITEMASK                       = 0x0B72
	DRAW_FRAMEBUFFER                      = 0x8CA9
	DST_COLOR                             = 0x306
	DYNAMIC_DRAW                          = 0x88E8
	DYNAMIC_READ                          = 0x88E9
	ELEMENT_ARRAY_BUFFER                  = 0x8893
	ELEMENT_ARRAY_BUFFER_BINDING          = 0x8895
	EXTENSIONS                            = 0x1f03
	FALSE                                 = 0
	FLOAT                                 = 0x1406
	FRAGMENT_SHADER                       = 0x8b30
	FRAMEBUFFER                           = 0x8d40
	FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210
	FRAMEBUFFER_BINDING                   = 0x8ca6
	FRAMEBUFFER_COMPLETE                  = 0x8cd5
	FRAMEBUFFER_SRGB                      = 0x8db9
	HALF_FLOAT                            = 0x140b
	HALF_FLOAT_OES                        = 0x8d61
	INFO_LOG_LENGTH                       = 0x8B84
	INVALID_INDEX                         = ^uint(0)
	GREATER                               = 0x204
	GEQUAL                                = 0x206
	LINEAR                                = 0x2601
	LINEAR_MIPMAP_LINEAR                  = 0x2703
	LINK_STATUS                           = 0x8b82
	LUMINANCE                             = 0x1909
	MAP_READ_BIT                          = 0x0001
	MAX_TEXTURE_SIZE                      = 0xd33
	NEAREST                               = 0x2600
	NO_ERROR                              = 0x0
	NUM_EXTENSIONS                        = 0x821D
	ONE                                   = 0x1
	ONE_MINUS_SRC_ALPHA                   = 0x303
	PACK_ROW_LENGTH                       = 0x0D02
	PROGRAM_BINARY_LENGTH                 = 0x8741
	QUERY_RESULT                          = 0x8866
	QUERY_RESULT_AVAILABLE                = 0x8867
	R16F                                  = 0x822d
	R8                                    = 0x8229
	READ_FRAMEBUFFER                      = 0x8ca8
	READ_FRAMEBUFFER_BINDING              = 0x8CAA
	READ_ONLY                             = 0x88B8
	READ_WRITE                            = 0x88BA
	RED                                   = 0x1903
	RENDERER                              = 0x1F01
	RENDERBUFFER                          = 0x8d41
	RENDERBUFFER_BINDING                  = 0x8ca7
	RENDERBUFFER_HEIGHT                   = 0x8d43
	RENDERBUFFER_WIDTH                    = 0x8d42
	RGB                                   = 0x1907
	RGBA                                  = 0x1908
	RGBA8                                 = 0x8058
	SHADER_STORAGE_BUFFER                 = 0x90D2
	SHADER_STORAGE_BUFFER_BINDING         = 0x90D3
	SHORT                                 = 0x1402
	SRGB                                  = 0x8c40
	SRGB_ALPHA_EXT                        = 0x8c42
	SRGB8                                 = 0x8c41
	SRGB8_ALPHA8                          = 0x8c43
	STATIC_DRAW                           = 0x88e4
	STENCIL_BUFFER_BIT                    = 0x00000400
	TEXTURE_2D                            = 0xde1
	TEXTURE_BINDING_2D                    = 0x8069
	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
	TRUE                                  = 1
	UNIFORM_BUFFER                        = 0x8A11
	UNIFORM_BUFFER_BINDING                = 0x8A28
	UNPACK_ALIGNMENT                      = 0xcf5
	UNPACK_ROW_LENGTH                     = 0x0CF2
	UNSIGNED_BYTE                         = 0x1401
	UNSIGNED_SHORT                        = 0x1403
	VIEWPORT                              = 0x0BA2
	VERSION                               = 0x1f02
	VERTEX_ARRAY_BINDING                  = 0x85B5
	VERTEX_SHADER                         = 0x8b31
	VERTEX_ATTRIB_ARRAY_BUFFER_BINDING    = 0x889F
	VERTEX_ATTRIB_ARRAY_ENABLED           = 0x8622
	VERTEX_ATTRIB_ARRAY_POINTER           = 0x8645
	VERTEX_ATTRIB_ARRAY_NORMALIZED        = 0x886A
	VERTEX_ATTRIB_ARRAY_SIZE              = 0x8623
	VERTEX_ATTRIB_ARRAY_STRIDE            = 0x8624
	VERTEX_ATTRIB_ARRAY_TYPE              = 0x8625
	WRITE_ONLY                            = 0x88B9
	ZERO                                  = 0x0

	// EXT_disjoint_timer_query
	TIME_ELAPSED_EXT = 0x88BF
	GPU_DISJOINT_EXT = 0x8FBB
)

Variables

This section is empty.

Functions

func ParseGLVersion

func ParseGLVersion(glVer string) (version [2]int, gles bool, err error)

Types

type Attrib

type Attrib uint

type Buffer

type Buffer Object

func (Buffer) Equal

func (b Buffer) Equal(b2 Buffer) bool

type Context

type Context interface{}

type Enum

type Enum uint

type Framebuffer

type Framebuffer Object

func (Framebuffer) Equal

func (f Framebuffer) Equal(f2 Framebuffer) bool

func (Framebuffer) Valid

func (u Framebuffer) Valid() bool

type Functions

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

func NewFunctions

func NewFunctions(ctx Context, forceES bool) (*Functions, error)

func (*Functions) ActiveTexture

func (f *Functions) ActiveTexture(texture Enum)

func (*Functions) AttachShader

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

func (*Functions) BeginQuery

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

func (*Functions) BindAttribLocation

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

func (*Functions) BindBuffer

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

func (*Functions) BindBufferBase

func (f *Functions) BindBufferBase(target Enum, index int, b Buffer)

func (*Functions) BindFramebuffer

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

func (*Functions) BindImageTexture

func (f *Functions) BindImageTexture(unit int, t Texture, level int, layered bool, layer int, access, format Enum)

func (*Functions) BindRenderbuffer

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

func (*Functions) BindTexture

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

func (*Functions) BindVertexArray

func (f *Functions) BindVertexArray(a VertexArray)

func (*Functions) BlendEquation

func (f *Functions) BlendEquation(mode Enum)

func (*Functions) BlendFuncSeparate

func (f *Functions) BlendFuncSeparate(srcRGB, dstRGB, srcA, dstA Enum)

func (*Functions) BlitFramebuffer

func (f *Functions) BlitFramebuffer(sx0, sy0, sx1, sy1, dx0, dy0, dx1, dy1 int, mask Enum, filter Enum)

func (*Functions) BufferData

func (f *Functions) BufferData(target Enum, size int, usage Enum, data []byte)

func (*Functions) BufferSubData

func (f *Functions) BufferSubData(target Enum, offset int, src []byte)

func (*Functions) CheckFramebufferStatus

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

func (*Functions) Clear

func (f *Functions) Clear(mask Enum)

func (*Functions) ClearColor

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

func (*Functions) ClearDepthf

func (f *Functions) ClearDepthf(d float32)

func (*Functions) CompileShader

func (f *Functions) CompileShader(s Shader)

func (*Functions) CopyTexSubImage2D

func (f *Functions) CopyTexSubImage2D(target Enum, level, xoffset, yoffset, x, y, width, height int)

func (*Functions) CreateBuffer

func (f *Functions) CreateBuffer() Buffer

func (*Functions) CreateFramebuffer

func (f *Functions) CreateFramebuffer() Framebuffer

func (*Functions) CreateProgram

func (f *Functions) CreateProgram() Program

func (*Functions) CreateQuery

func (f *Functions) CreateQuery() Query

func (*Functions) CreateRenderbuffer

func (f *Functions) CreateRenderbuffer() Renderbuffer

func (*Functions) CreateShader

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

func (*Functions) CreateTexture

func (f *Functions) CreateTexture() Texture

func (*Functions) CreateVertexArray

func (f *Functions) CreateVertexArray() VertexArray

func (*Functions) DeleteBuffer

func (f *Functions) DeleteBuffer(v Buffer)

func (*Functions) DeleteFramebuffer

func (f *Functions) DeleteFramebuffer(v Framebuffer)

func (*Functions) DeleteProgram

func (f *Functions) DeleteProgram(p Program)

func (*Functions) DeleteQuery

func (f *Functions) DeleteQuery(query Query)

func (*Functions) DeleteRenderbuffer

func (f *Functions) DeleteRenderbuffer(v Renderbuffer)

func (*Functions) DeleteShader

func (f *Functions) DeleteShader(s Shader)

func (*Functions) DeleteTexture

func (f *Functions) DeleteTexture(v Texture)

func (*Functions) DeleteVertexArray

func (f *Functions) DeleteVertexArray(array VertexArray)

func (*Functions) DepthFunc

func (f *Functions) DepthFunc(v Enum)

func (*Functions) DepthMask

func (f *Functions) DepthMask(mask bool)

func (*Functions) Disable

func (f *Functions) Disable(cap Enum)

func (*Functions) DisableVertexAttribArray

func (f *Functions) DisableVertexAttribArray(a Attrib)

func (*Functions) DispatchCompute

func (f *Functions) DispatchCompute(x, y, z int)

func (*Functions) DrawArrays

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

func (*Functions) DrawElements

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

func (*Functions) Enable

func (f *Functions) Enable(cap Enum)

func (*Functions) EnableVertexAttribArray

func (f *Functions) EnableVertexAttribArray(a Attrib)

func (*Functions) EndQuery

func (f *Functions) EndQuery(target Enum)

func (*Functions) Finish

func (f *Functions) Finish()

func (*Functions) Flush

func (f *Functions) Flush()

func (*Functions) FramebufferRenderbuffer

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

func (*Functions) FramebufferTexture2D

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

func (*Functions) GenerateMipmap

func (f *Functions) GenerateMipmap(target Enum)

func (*Functions) GetBinding

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

func (*Functions) GetBindingi

func (c *Functions) GetBindingi(pname Enum, idx int) Object

func (*Functions) GetError

func (f *Functions) GetError() Enum

func (*Functions) GetFloat

func (f *Functions) GetFloat(pname Enum) float32

func (*Functions) GetFloat4

func (f *Functions) GetFloat4(pname Enum) [4]float32

func (*Functions) GetFramebufferAttachmentParameteri

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

func (*Functions) GetInteger

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

func (*Functions) GetInteger4

func (f *Functions) GetInteger4(pname Enum) [4]int

func (*Functions) GetIntegeri

func (f *Functions) GetIntegeri(pname Enum, idx int) int

func (*Functions) GetProgramBinary

func (f *Functions) GetProgramBinary(p Program) []byte

func (*Functions) GetProgramInfoLog

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

func (*Functions) GetProgrami

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

func (*Functions) GetQueryObjectuiv

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

func (*Functions) GetRenderbufferParameteri

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

func (*Functions) GetShaderInfoLog

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

func (*Functions) GetShaderi

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

func (*Functions) GetString

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

func (*Functions) GetUniformBlockIndex

func (f *Functions) GetUniformBlockIndex(p Program, name string) uint

func (*Functions) GetUniformLocation

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

func (*Functions) GetVertexAttrib

func (f *Functions) GetVertexAttrib(index int, pname Enum) int

func (*Functions) GetVertexAttribBinding

func (f *Functions) GetVertexAttribBinding(index int, pname Enum) Object

func (*Functions) GetVertexAttribPointer

func (f *Functions) GetVertexAttribPointer(index int, pname Enum) uintptr

func (*Functions) InvalidateFramebuffer

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

func (*Functions) IsEnabled

func (f *Functions) IsEnabled(cap Enum) bool

func (*Functions) LinkProgram

func (f *Functions) LinkProgram(p Program)

func (*Functions) MapBufferRange

func (f *Functions) MapBufferRange(target Enum, offset, length int, access Enum) []byte

func (*Functions) MemoryBarrier

func (f *Functions) MemoryBarrier(barriers Enum)

func (*Functions) PixelStorei

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

func (*Functions) ReadPixels

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

func (*Functions) RenderbufferStorage

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

func (*Functions) Scissor

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

func (*Functions) ShaderSource

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

func (*Functions) TexImage2D

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

func (*Functions) TexParameteri

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

func (*Functions) TexStorage2D

func (f *Functions) TexStorage2D(target Enum, levels int, internalFormat Enum, width, height int)

func (*Functions) TexSubImage2D

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

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

func (*Functions) Uniform1i

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

func (*Functions) Uniform2f

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

func (*Functions) Uniform3f

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

func (*Functions) Uniform4f

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

func (*Functions) UniformBlockBinding

func (f *Functions) UniformBlockBinding(p Program, uniformBlockIndex uint, uniformBlockBinding uint)

func (*Functions) UnmapBuffer

func (f *Functions) UnmapBuffer(target Enum) bool

func (*Functions) UseProgram

func (f *Functions) UseProgram(p Program)

func (*Functions) VertexAttribPointer

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

func (*Functions) Viewport

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

type Object

type Object struct{ V uint }

type Program

type Program Object

func CreateComputeProgram

func CreateComputeProgram(ctx *Functions, src string) (Program, error)

func CreateProgram

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

func (Program) Equal

func (p Program) Equal(p2 Program) bool

func (Program) Valid

func (p Program) Valid() bool

type Query

type Query Object

type Renderbuffer

type Renderbuffer Object

func (Renderbuffer) Equal

func (r Renderbuffer) Equal(r2 Renderbuffer) bool

type Shader

type Shader Object

func CreateShader

func CreateShader(ctx *Functions, typ Enum, src string) (Shader, error)

func (Shader) Equal

func (s Shader) Equal(s2 Shader) bool

func (Shader) Valid

func (s Shader) Valid() bool

type Texture

type Texture Object

func (Texture) Equal

func (t Texture) Equal(t2 Texture) bool

type Uniform

type Uniform struct{ V int }

func (Uniform) Equal

func (u Uniform) Equal(u2 Uniform) bool

func (Uniform) Valid

func (u Uniform) Valid() bool

type VertexArray

type VertexArray Object

func (VertexArray) Equal

func (a VertexArray) Equal(a2 VertexArray) bool

func (VertexArray) Valid

func (a VertexArray) Valid() bool

Jump to

Keyboard shortcuts

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