gl

package
v2.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

This is a fork of github.com/go-gl/gl/v2.1/gl with the below patch. This is now modified manually.

The original version is generated from github.com/hajimehoshi/glow's nocgo branch. This enables to remove dependencies on Cgo on Windows.

Now we are working on committing this 'no-cgo' change to the official gl package. See https://github.com/go-gl/glow/pull/102.

Documentation

Index

Constants

View Source
const (
	ALWAYS                = 0x0207
	ARRAY_BUFFER          = 0x8892
	BACK                  = 0x0405
	BLEND                 = 0x0BE2
	CLAMP_TO_EDGE         = 0x812F
	COLOR_ATTACHMENT0     = 0x8CE0
	COMPILE_STATUS        = 0x8B81
	DECR_WRAP             = 0x8508
	DEPTH24_STENCIL8      = 0x88F0
	DST_ALPHA             = 0x0304
	DST_COLOR             = 0x0306
	DYNAMIC_DRAW          = 0x88E8
	ELEMENT_ARRAY_BUFFER  = 0x8893
	FALSE                 = 0
	FLOAT                 = 0x1406
	FRAGMENT_SHADER       = 0x8B30
	FRAMEBUFFER           = 0x8D40
	FRAMEBUFFER_BINDING   = 0x8CA6
	FRAMEBUFFER_COMPLETE  = 0x8CD5
	FRONT                 = 0x0404
	FRONT_AND_BACK        = 0x0408
	FUNC_ADD              = 0x8006
	FUNC_REVERSE_SUBTRACT = 0x800b
	FUNC_SUBTRACT         = 0x800a
	HIGH_FLOAT            = 0x8DF2
	INCR_WRAP             = 0x8507
	INFO_LOG_LENGTH       = 0x8B84
	INVERT                = 0x150A
	KEEP                  = 0x1E00
	LINK_STATUS           = 0x8B82
	MAX                   = 0x8008
	MAX_TEXTURE_SIZE      = 0x0D33
	MIN                   = 0x8007
	NEAREST               = 0x2600
	NO_ERROR              = 0
	NOTEQUAL              = 0x0205
	ONE                   = 1
	ONE_MINUS_DST_ALPHA   = 0x0305
	ONE_MINUS_DST_COLOR   = 0x0307
	ONE_MINUS_SRC_ALPHA   = 0x0303
	ONE_MINUS_SRC_COLOR   = 0x0301
	PIXEL_PACK_BUFFER     = 0x88EB
	PIXEL_UNPACK_BUFFER   = 0x88EC
	READ_WRITE            = 0x88BA
	RENDERBUFFER          = 0x8D41
	RGBA                  = 0x1908
	SCISSOR_TEST          = 0x0C11
	SHORT                 = 0x1402
	SRC_ALPHA             = 0x0302
	SRC_ALPHA_SATURATE    = 0x0308
	SRC_COLOR             = 0x0300
	STENCIL_ATTACHMENT    = 0x8D20
	STENCIL_BUFFER_BIT    = 0x0400
	STENCIL_INDEX8        = 0x8D48
	STENCIL_TEST          = 0x0B90
	STREAM_DRAW           = 0x88E0
	TEXTURE0              = 0x84C0
	TEXTURE_2D            = 0x0DE1
	TEXTURE_MAG_FILTER    = 0x2800
	TEXTURE_MIN_FILTER    = 0x2801
	TEXTURE_WRAP_S        = 0x2802
	TEXTURE_WRAP_T        = 0x2803
	TRIANGLES             = 0x0004
	TRUE                  = 1
	UNPACK_ALIGNMENT      = 0x0CF5
	UNSIGNED_BYTE         = 0x1401
	UNSIGNED_INT          = 0x1405
	VERTEX_SHADER         = 0x8B31
	WRITE_ONLY            = 0x88B9
	ZERO                  = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context added in v2.5.0

type Context interface {
	LoadFunctions() error
	IsES() bool

	ActiveTexture(texture uint32)
	AttachShader(program uint32, shader uint32)
	BindAttribLocation(program uint32, index uint32, name string)
	BindBuffer(target uint32, buffer uint32)
	BindFramebuffer(target uint32, framebuffer uint32)
	BindRenderbuffer(target uint32, renderbuffer uint32)
	BindTexture(target uint32, texture uint32)
	BindVertexArray(array uint32)
	BlendEquationSeparate(modeRGB uint32, modeAlpha uint32)
	BlendFuncSeparate(srcRGB uint32, dstRGB uint32, srcAlpha uint32, dstAlpha uint32)
	BufferInit(target uint32, size int, usage uint32)
	BufferSubData(target uint32, offset int, data []byte)
	CheckFramebufferStatus(target uint32) uint32
	Clear(mask uint32)
	ColorMask(red, green, blue, alpha bool)
	CompileShader(shader uint32)
	CreateBuffer() uint32
	CreateFramebuffer() uint32
	CreateProgram() uint32
	CreateRenderbuffer() uint32
	CreateShader(xtype uint32) uint32
	CreateTexture() uint32
	CreateVertexArray() uint32
	DeleteBuffer(buffer uint32)
	DeleteFramebuffer(framebuffer uint32)
	DeleteProgram(program uint32)
	DeleteRenderbuffer(renderbuffer uint32)
	DeleteShader(shader uint32)
	DeleteTexture(texture uint32)
	DeleteVertexArray(array uint32)
	Disable(cap uint32)
	DisableVertexAttribArray(index uint32)
	DrawElements(mode uint32, count int32, xtype uint32, offset int)
	Enable(cap uint32)
	EnableVertexAttribArray(index uint32)
	Flush()
	FramebufferRenderbuffer(target uint32, attachment uint32, renderbuffertarget uint32, renderbuffer uint32)
	FramebufferTexture2D(target uint32, attachment uint32, textarget uint32, texture uint32, level int32)
	GetError() uint32
	GetInteger(pname uint32) int
	GetProgramInfoLog(program uint32) string
	GetProgrami(program uint32, pname uint32) int
	GetShaderInfoLog(shader uint32) string
	GetShaderi(shader uint32, pname uint32) int
	GetUniformLocation(program uint32, name string) int32
	IsProgram(program uint32) bool
	LinkProgram(program uint32)
	PixelStorei(pname uint32, param int32)
	ReadPixels(dst []byte, x int32, y int32, width int32, height int32, format uint32, xtype uint32)
	RenderbufferStorage(target uint32, internalFormat uint32, width int32, height int32)
	Scissor(x, y, width, height int32)
	ShaderSource(shader uint32, xstring string)
	StencilFunc(func_ uint32, ref int32, mask uint32)
	StencilOpSeparate(face, sfail, dpfail, dppass uint32)
	TexImage2D(target uint32, level int32, internalformat int32, width int32, height int32, format uint32, xtype uint32, pixels []byte)
	TexParameteri(target uint32, pname uint32, param int32)
	TexSubImage2D(target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, xtype uint32, pixels []byte)
	Uniform1fv(location int32, value []float32)
	Uniform1i(location int32, v0 int32)
	Uniform1iv(location int32, value []int32)
	Uniform2fv(location int32, value []float32)
	Uniform2iv(location int32, value []int32)
	Uniform3fv(location int32, value []float32)
	Uniform3iv(location int32, value []int32)
	Uniform4fv(location int32, value []float32)
	Uniform4iv(location int32, value []int32)
	UniformMatrix2fv(location int32, value []float32)
	UniformMatrix3fv(location int32, value []float32)
	UniformMatrix4fv(location int32, value []float32)
	UseProgram(program uint32)
	VertexAttribPointer(index uint32, size int32, xtype uint32, normalized bool, stride int32, offset int)
	Viewport(x int32, y int32, width int32, height int32)
}

Context is a context for OpenGL (ES) functions.

Context is basically the same as gomobile's gl.Context. See https://pkg.go.dev/github.com/ebitengine/gomobile/gl#Context

func NewDefaultContext added in v2.5.0

func NewDefaultContext() (Context, error)

type DebugContext added in v2.6.0

type DebugContext struct {
	Context Context
}

func (*DebugContext) ActiveTexture added in v2.6.0

func (d *DebugContext) ActiveTexture(arg0 uint32)

func (*DebugContext) AttachShader added in v2.6.0

func (d *DebugContext) AttachShader(arg0 uint32, arg1 uint32)

func (*DebugContext) BindAttribLocation added in v2.6.0

func (d *DebugContext) BindAttribLocation(arg0 uint32, arg1 uint32, arg2 string)

func (*DebugContext) BindBuffer added in v2.6.0

func (d *DebugContext) BindBuffer(arg0 uint32, arg1 uint32)

func (*DebugContext) BindFramebuffer added in v2.6.0

func (d *DebugContext) BindFramebuffer(arg0 uint32, arg1 uint32)

func (*DebugContext) BindRenderbuffer added in v2.6.0

func (d *DebugContext) BindRenderbuffer(arg0 uint32, arg1 uint32)

func (*DebugContext) BindTexture added in v2.6.0

func (d *DebugContext) BindTexture(arg0 uint32, arg1 uint32)

func (*DebugContext) BindVertexArray added in v2.6.0

func (d *DebugContext) BindVertexArray(arg0 uint32)

func (*DebugContext) BlendEquationSeparate added in v2.6.0

func (d *DebugContext) BlendEquationSeparate(arg0 uint32, arg1 uint32)

func (*DebugContext) BlendFuncSeparate added in v2.6.0

func (d *DebugContext) BlendFuncSeparate(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint32)

func (*DebugContext) BufferInit added in v2.6.0

func (d *DebugContext) BufferInit(arg0 uint32, arg1 int, arg2 uint32)

func (*DebugContext) BufferSubData added in v2.6.0

func (d *DebugContext) BufferSubData(arg0 uint32, arg1 int, arg2 []uint8)

func (*DebugContext) CheckFramebufferStatus added in v2.6.0

func (d *DebugContext) CheckFramebufferStatus(arg0 uint32) uint32

func (*DebugContext) Clear added in v2.6.0

func (d *DebugContext) Clear(arg0 uint32)

func (*DebugContext) ColorMask added in v2.6.0

func (d *DebugContext) ColorMask(arg0 bool, arg1 bool, arg2 bool, arg3 bool)

func (*DebugContext) CompileShader added in v2.6.0

func (d *DebugContext) CompileShader(arg0 uint32)

func (*DebugContext) CreateBuffer added in v2.6.0

func (d *DebugContext) CreateBuffer() uint32

func (*DebugContext) CreateFramebuffer added in v2.6.0

func (d *DebugContext) CreateFramebuffer() uint32

func (*DebugContext) CreateProgram added in v2.6.0

func (d *DebugContext) CreateProgram() uint32

func (*DebugContext) CreateRenderbuffer added in v2.6.0

func (d *DebugContext) CreateRenderbuffer() uint32

func (*DebugContext) CreateShader added in v2.6.0

func (d *DebugContext) CreateShader(arg0 uint32) uint32

func (*DebugContext) CreateTexture added in v2.6.0

func (d *DebugContext) CreateTexture() uint32

func (*DebugContext) CreateVertexArray added in v2.6.0

func (d *DebugContext) CreateVertexArray() uint32

func (*DebugContext) DeleteBuffer added in v2.6.0

func (d *DebugContext) DeleteBuffer(arg0 uint32)

func (*DebugContext) DeleteFramebuffer added in v2.6.0

func (d *DebugContext) DeleteFramebuffer(arg0 uint32)

func (*DebugContext) DeleteProgram added in v2.6.0

func (d *DebugContext) DeleteProgram(arg0 uint32)

func (*DebugContext) DeleteRenderbuffer added in v2.6.0

func (d *DebugContext) DeleteRenderbuffer(arg0 uint32)

func (*DebugContext) DeleteShader added in v2.6.0

func (d *DebugContext) DeleteShader(arg0 uint32)

func (*DebugContext) DeleteTexture added in v2.6.0

func (d *DebugContext) DeleteTexture(arg0 uint32)

func (*DebugContext) DeleteVertexArray added in v2.6.0

func (d *DebugContext) DeleteVertexArray(arg0 uint32)

func (*DebugContext) Disable added in v2.6.0

func (d *DebugContext) Disable(arg0 uint32)

func (*DebugContext) DisableVertexAttribArray added in v2.6.0

func (d *DebugContext) DisableVertexAttribArray(arg0 uint32)

func (*DebugContext) DrawElements added in v2.6.0

func (d *DebugContext) DrawElements(arg0 uint32, arg1 int32, arg2 uint32, arg3 int)

func (*DebugContext) Enable added in v2.6.0

func (d *DebugContext) Enable(arg0 uint32)

func (*DebugContext) EnableVertexAttribArray added in v2.6.0

func (d *DebugContext) EnableVertexAttribArray(arg0 uint32)

func (*DebugContext) Flush added in v2.6.0

func (d *DebugContext) Flush()

func (*DebugContext) FramebufferRenderbuffer added in v2.6.0

func (d *DebugContext) FramebufferRenderbuffer(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint32)

func (*DebugContext) FramebufferTexture2D added in v2.6.0

func (d *DebugContext) FramebufferTexture2D(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint32, arg4 int32)

func (*DebugContext) GetError added in v2.6.0

func (d *DebugContext) GetError() uint32

func (*DebugContext) GetInteger added in v2.6.0

func (d *DebugContext) GetInteger(arg0 uint32) int

func (*DebugContext) GetProgramInfoLog added in v2.6.0

func (d *DebugContext) GetProgramInfoLog(arg0 uint32) string

func (*DebugContext) GetProgrami added in v2.6.0

func (d *DebugContext) GetProgrami(arg0 uint32, arg1 uint32) int

func (*DebugContext) GetShaderInfoLog added in v2.6.0

func (d *DebugContext) GetShaderInfoLog(arg0 uint32) string

func (*DebugContext) GetShaderi added in v2.6.0

func (d *DebugContext) GetShaderi(arg0 uint32, arg1 uint32) int

func (*DebugContext) GetUniformLocation added in v2.6.0

func (d *DebugContext) GetUniformLocation(arg0 uint32, arg1 string) int32

func (*DebugContext) IsES added in v2.6.0

func (d *DebugContext) IsES() bool

func (*DebugContext) IsProgram added in v2.6.0

func (d *DebugContext) IsProgram(arg0 uint32) bool

func (*DebugContext) LinkProgram added in v2.6.0

func (d *DebugContext) LinkProgram(arg0 uint32)

func (*DebugContext) LoadFunctions added in v2.6.0

func (d *DebugContext) LoadFunctions() error

func (*DebugContext) PixelStorei added in v2.6.0

func (d *DebugContext) PixelStorei(arg0 uint32, arg1 int32)

func (*DebugContext) ReadPixels added in v2.6.0

func (d *DebugContext) ReadPixels(arg0 []uint8, arg1 int32, arg2 int32, arg3 int32, arg4 int32, arg5 uint32, arg6 uint32)

func (*DebugContext) RenderbufferStorage added in v2.6.0

func (d *DebugContext) RenderbufferStorage(arg0 uint32, arg1 uint32, arg2 int32, arg3 int32)

func (*DebugContext) Scissor added in v2.6.0

func (d *DebugContext) Scissor(arg0 int32, arg1 int32, arg2 int32, arg3 int32)

func (*DebugContext) ShaderSource added in v2.6.0

func (d *DebugContext) ShaderSource(arg0 uint32, arg1 string)

func (*DebugContext) StencilFunc added in v2.6.0

func (d *DebugContext) StencilFunc(arg0 uint32, arg1 int32, arg2 uint32)

func (*DebugContext) StencilOpSeparate added in v2.7.0

func (d *DebugContext) StencilOpSeparate(arg0 uint32, arg1 uint32, arg2 uint32, arg3 uint32)

func (*DebugContext) TexImage2D added in v2.6.0

func (d *DebugContext) TexImage2D(arg0 uint32, arg1 int32, arg2 int32, arg3 int32, arg4 int32, arg5 uint32, arg6 uint32, arg7 []uint8)

func (*DebugContext) TexParameteri added in v2.6.0

func (d *DebugContext) TexParameteri(arg0 uint32, arg1 uint32, arg2 int32)

func (*DebugContext) TexSubImage2D added in v2.6.0

func (d *DebugContext) TexSubImage2D(arg0 uint32, arg1 int32, arg2 int32, arg3 int32, arg4 int32, arg5 int32, arg6 uint32, arg7 uint32, arg8 []uint8)

func (*DebugContext) Uniform1fv added in v2.6.0

func (d *DebugContext) Uniform1fv(arg0 int32, arg1 []float32)

func (*DebugContext) Uniform1i added in v2.6.0

func (d *DebugContext) Uniform1i(arg0 int32, arg1 int32)

func (*DebugContext) Uniform1iv added in v2.6.0

func (d *DebugContext) Uniform1iv(arg0 int32, arg1 []int32)

func (*DebugContext) Uniform2fv added in v2.6.0

func (d *DebugContext) Uniform2fv(arg0 int32, arg1 []float32)

func (*DebugContext) Uniform2iv added in v2.6.0

func (d *DebugContext) Uniform2iv(arg0 int32, arg1 []int32)

func (*DebugContext) Uniform3fv added in v2.6.0

func (d *DebugContext) Uniform3fv(arg0 int32, arg1 []float32)

func (*DebugContext) Uniform3iv added in v2.6.0

func (d *DebugContext) Uniform3iv(arg0 int32, arg1 []int32)

func (*DebugContext) Uniform4fv added in v2.6.0

func (d *DebugContext) Uniform4fv(arg0 int32, arg1 []float32)

func (*DebugContext) Uniform4iv added in v2.6.0

func (d *DebugContext) Uniform4iv(arg0 int32, arg1 []int32)

func (*DebugContext) UniformMatrix2fv added in v2.6.0

func (d *DebugContext) UniformMatrix2fv(arg0 int32, arg1 []float32)

func (*DebugContext) UniformMatrix3fv added in v2.6.0

func (d *DebugContext) UniformMatrix3fv(arg0 int32, arg1 []float32)

func (*DebugContext) UniformMatrix4fv added in v2.6.0

func (d *DebugContext) UniformMatrix4fv(arg0 int32, arg1 []float32)

func (*DebugContext) UseProgram added in v2.6.0

func (d *DebugContext) UseProgram(arg0 uint32)

func (*DebugContext) VertexAttribPointer added in v2.6.0

func (d *DebugContext) VertexAttribPointer(arg0 uint32, arg1 int32, arg2 uint32, arg3 bool, arg4 int32, arg5 int)

func (*DebugContext) Viewport added in v2.6.0

func (d *DebugContext) Viewport(arg0 int32, arg1 int32, arg2 int32, arg3 int32)

Jump to

Keyboard shortcuts

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