gl

package
v2.5.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0, MIT Imports: 7 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
	BLEND                = 0x0BE2
	CLAMP_TO_EDGE        = 0x812F
	COLOR_ATTACHMENT0    = 0x8CE0
	COMPILE_STATUS       = 0x8B81
	DEPTH24_STENCIL8     = 0x88F0
	DYNAMIC_DRAW         = 0x88E8
	ELEMENT_ARRAY_BUFFER = 0x8893
	FALSE                = 0
	FLOAT                = 0x1406
	FRAGMENT_SHADER      = 0x8B30
	FRAMEBUFFER          = 0x8D40
	FRAMEBUFFER_BINDING  = 0x8CA6
	FRAMEBUFFER_COMPLETE = 0x8CD5
	HIGH_FLOAT           = 0x8DF2
	INFO_LOG_LENGTH      = 0x8B84
	INVERT               = 0x150A
	KEEP                 = 0x1E00
	LINK_STATUS          = 0x8B82
	MAX_TEXTURE_SIZE     = 0x0D33
	NEAREST              = 0x2600
	NO_ERROR             = 0
	NOTEQUAL             = 0x0205
	PIXEL_PACK_BUFFER    = 0x88EB
	PIXEL_UNPACK_BUFFER  = 0x88EC
	READ_WRITE           = 0x88BA
	RENDERBUFFER         = 0x8D41
	RGBA                 = 0x1908
	SCISSOR_TEST         = 0x0C11
	SHORT                = 0x1402
	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_SHORT       = 0x1403
	VERTEX_SHADER        = 0x8B31
	WRITE_ONLY           = 0x88B9
)

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)
	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
	DeleteBuffer(buffer uint32)
	DeleteFramebuffer(framebuffer uint32)
	DeleteProgram(program uint32)
	DeleteRenderbuffer(renderbuffer uint32)
	DeleteShader(shader uint32)
	DeleteTexture(textures 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
	IsFramebuffer(framebuffer uint32) bool
	IsProgram(program uint32) bool
	IsRenderbuffer(renderbuffer uint32) bool
	IsTexture(texture 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)
	StencilOp(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/golang.org/x/mobile/gl#Context

func NewDefaultContext added in v2.5.0

func NewDefaultContext() (Context, error)

Jump to

Keyboard shortcuts

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