Documentation ¶
Overview ¶
Package gles2 implements Go bindings to OpenGL.
This package was automatically generated using Glow:
http://github.com/go-gl/glow
Generated based on the OpenGL XML specification:
SVN revision 27695
This file implements GlowGetProcAddress for every supported platform. The correct version is chosen automatically based on build tags: windows: WGL darwin: CGL linux: GLX Use of EGL instead of the platform's default (listed above) is made possible via the "egl" build tag. It is also possible to install your own function outside this package for retrieving OpenGL function pointers, to do this see InitWithProcAddrFunc.
Index ¶
- Constants
- func ActiveTexture(texture uint32)
- func AttachShader(program uint32, shader uint32)
- func BindBuffer(target uint32, buffer uint32)
- func BindFramebuffer(target uint32, framebuffer uint32)
- func BindRenderbuffer(target uint32, renderbuffer uint32)
- func BindTexture(target uint32, texture uint32)
- func BlendColor(red float32, green float32, blue float32, alpha float32)
- func BlendEquationSeparate(modeRGB uint32, modeAlpha uint32)
- func BlendFuncSeparate(sfactorRGB uint32, dfactorRGB uint32, sfactorAlpha uint32, dfactorAlpha uint32)
- func BufferData(target uint32, size int, data unsafe.Pointer, usage uint32)
- func CheckFramebufferStatus(target uint32) uint32
- func Clear(mask uint32)
- func ClearColor(red float32, green float32, blue float32, alpha float32)
- func ClearDepthf(d float32)
- func ClearStencil(s int32)
- func ColorMask(red bool, green bool, blue bool, alpha bool)
- func CompileShader(shader uint32)
- func CreateProgram() uint32
- func CreateShader(xtype uint32) uint32
- func CullFace(mode uint32)
- func DeleteBuffers(n int32, buffers *uint32)
- func DeleteFramebuffers(n int32, framebuffers *uint32)
- func DeleteProgram(program uint32)
- func DeleteRenderbuffers(n int32, renderbuffers *uint32)
- func DeleteShader(shader uint32)
- func DeleteTextures(n int32, textures *uint32)
- func DepthFunc(xfunc uint32)
- func DepthMask(flag bool)
- func Disable(cap uint32)
- func DisableVertexAttribArray(index uint32)
- func DrawArrays(mode uint32, first int32, count int32)
- func DrawElements(mode uint32, count int32, xtype uint32, indices unsafe.Pointer)
- func Enable(cap uint32)
- func EnableVertexAttribArray(index uint32)
- func Finish()
- func Flush()
- func FramebufferRenderbuffer(target uint32, attachment uint32, renderbuffertarget uint32, ...)
- func FramebufferTexture2D(target uint32, attachment uint32, textarget uint32, texture uint32, ...)
- func GenBuffers(n int32, buffers *uint32)
- func GenFramebuffers(n int32, framebuffers *uint32)
- func GenRenderbuffers(n int32, renderbuffers *uint32)
- func GenTextures(n int32, textures *uint32)
- func GenerateMipmap(target uint32)
- func GetAttribLocation(program uint32, name *uint8) int32
- func GetBooleanv(pname uint32, data *bool)
- func GetError() uint32
- func GetFloatv(pname uint32, data *float32)
- func GetIntegerv(pname uint32, data *int32)
- func GetProgramInfoLog(program uint32, bufSize int32, length *int32, infoLog *uint8)
- func GetProgramiv(program uint32, pname uint32, params *int32)
- func GetShaderInfoLog(shader uint32, bufSize int32, length *int32, infoLog *uint8)
- func GetShaderiv(shader uint32, pname uint32, params *int32)
- func GetString(name uint32) *uint8
- func GetUniformLocation(program uint32, name *uint8) int32
- func GoStr(cstr *uint8) string
- func Init() error
- func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error
- func LinkProgram(program uint32)
- func Ptr(data interface{}) unsafe.Pointer
- func PtrOffset(offset int) unsafe.Pointer
- func ReadPixels(x int32, y int32, width int32, height int32, format uint32, xtype uint32, ...)
- func Scissor(x int32, y int32, width int32, height int32)
- func ShaderSource(shader uint32, count int32, xstring **uint8, length *int32)
- func StencilFuncSeparate(face uint32, xfunc uint32, ref int32, mask uint32)
- func StencilMaskSeparate(face uint32, mask uint32)
- func StencilOpSeparate(face uint32, sfail uint32, dpfail uint32, dppass uint32)
- func Str(str string) *uint8
- func Strs(strs ...string) (cstrs **uint8, free func())
- func TexImage2D(target uint32, level int32, internalformat int32, width int32, height int32, ...)
- func TexParameterfv(target uint32, pname uint32, params *float32)
- func TexParameteri(target uint32, pname uint32, param int32)
- func Uniform1fv(location int32, count int32, value *float32)
- func Uniform1i(location int32, v0 int32)
- func Uniform1iv(location int32, count int32, value *int32)
- func Uniform2fv(location int32, count int32, value *float32)
- func Uniform3fv(location int32, count int32, value *float32)
- func Uniform4fv(location int32, count int32, value *float32)
- func UniformMatrix4fv(location int32, count int32, transpose bool, value *float32)
- func UseProgram(program uint32)
- func VertexAttribPointer(index uint32, size int32, xtype uint32, normalized bool, stride int32, ...)
- func Viewport(x int32, y int32, width int32, height int32)
Constants ¶
const ( ALPHA_BITS = 0x0D55 ALWAYS = 0x0207 ARRAY_BUFFER = 0x8892 BACK = 0x0405 BLEND = 0x0BE2 BLEND_COLOR = 0x8005 BLEND_DST_ALPHA = 0x80CA BLEND_DST_RGB = 0x80C8 BLEND_EQUATION_ALPHA = 0x883D BLEND_EQUATION_RGB = 0x8009 BLEND_SRC_ALPHA = 0x80CB BLEND_SRC_RGB = 0x80C9 BLUE_BITS = 0x0D54 CLAMP_TO_EDGE = 0x812F COLOR_ATTACHMENT0 = 0x8CE0 COLOR_BUFFER_BIT = 0x00004000 COLOR_CLEAR_VALUE = 0x0C22 COLOR_WRITEMASK = 0x0C23 COMPILE_STATUS = 0x8B81 COMPRESSED_TEXTURE_FORMATS = 0x86A3 CONSTANT_ALPHA = 0x8003 CONSTANT_COLOR = 0x8001 CULL_FACE = 0x0B44 CULL_FACE_MODE = 0x0B45 CURRENT_PROGRAM = 0x8B8D DEBUG_SEVERITY_HIGH = 0x9146 DEBUG_SEVERITY_LOW = 0x9148 DEBUG_SEVERITY_MEDIUM = 0x9147 DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D DEBUG_TYPE_ERROR = 0x824C DEBUG_TYPE_OTHER = 0x8251 DEBUG_TYPE_PERFORMANCE = 0x8250 DEBUG_TYPE_PORTABILITY = 0x824F DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E DECR = 0x1E03 DECR_WRAP = 0x8508 DEPTH_ATTACHMENT = 0x8D00 DEPTH_BITS = 0x0D56 DEPTH_BUFFER_BIT = 0x00000100 DEPTH_CLEAR_VALUE = 0x0B73 DEPTH_COMPONENT = 0x1902 DEPTH_COMPONENT16 = 0x81A5 DEPTH_FUNC = 0x0B74 DEPTH_TEST = 0x0B71 DEPTH_WRITEMASK = 0x0B72 DITHER = 0x0BD0 DST_ALPHA = 0x0304 DST_COLOR = 0x0306 DYNAMIC_DRAW = 0x88E8 ELEMENT_ARRAY_BUFFER = 0x8893 EQUAL = 0x0202 EXTENSIONS = 0x1F03 FLOAT = 0x1406 FRAGMENT_SHADER = 0x8B30 FRAMEBUFFER = 0x8D40 FRAMEBUFFER_COMPLETE = 0x8CD5 FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6 FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9 FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7 FRAMEBUFFER_UNSUPPORTED = 0x8CDD FRONT = 0x0404 FRONT_AND_BACK = 0x0408 FUNC_ADD = 0x8006 FUNC_REVERSE_SUBTRACT = 0x800B FUNC_SUBTRACT = 0x800A GEQUAL = 0x0206 GREATER = 0x0204 GREEN_BITS = 0x0D53 INCR = 0x1E02 INCR_WRAP = 0x8507 INFO_LOG_LENGTH = 0x8B84 INVALID_ENUM = 0x0500 INVALID_FRAMEBUFFER_OPERATION = 0x0506 INVALID_OPERATION = 0x0502 INVALID_VALUE = 0x0501 INVERT = 0x150A KEEP = 0x1E00 LEQUAL = 0x0203 LESS = 0x0201 LINEAR = 0x2601 LINEAR_MIPMAP_LINEAR = 0x2703 LINEAR_MIPMAP_NEAREST = 0x2701 LINES = 0x0001 LINK_STATUS = 0x8B82 MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD MAX_TEXTURE_SIZE = 0x0D33 MAX_VARYING_VECTORS = 0x8DFC MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB MIRRORED_REPEAT = 0x8370 NEAREST = 0x2600 NEAREST_MIPMAP_LINEAR = 0x2702 NEAREST_MIPMAP_NEAREST = 0x2700 NEVER = 0x0200 NOTEQUAL = 0x0205 NO_ERROR = 0 NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2 ONE = 1 ONE_MINUS_CONSTANT_ALPHA = 0x8004 ONE_MINUS_CONSTANT_COLOR = 0x8002 ONE_MINUS_DST_ALPHA = 0x0305 ONE_MINUS_DST_COLOR = 0x0307 ONE_MINUS_SRC_ALPHA = 0x0303 ONE_MINUS_SRC_COLOR = 0x0301 OUT_OF_MEMORY = 0x0505 POINTS = 0x0000 RED_BITS = 0x0D52 RENDERBUFFER = 0x8D41 RENDERER = 0x1F01 REPEAT = 0x2901 REPLACE = 0x1E01 RGB = 0x1907 RGBA = 0x1908 SAMPLES = 0x80A9 SAMPLE_ALPHA_TO_COVERAGE = 0x809E SAMPLE_BUFFERS = 0x80A8 SCISSOR_BOX = 0x0C10 SCISSOR_TEST = 0x0C11 SHADING_LANGUAGE_VERSION = 0x8B8C SRC_ALPHA = 0x0302 SRC_ALPHA_SATURATE = 0x0308 SRC_COLOR = 0x0300 STACK_OVERFLOW = 0x0503 STACK_UNDERFLOW = 0x0504 STATIC_DRAW = 0x88E4 STENCIL_ATTACHMENT = 0x8D20 STENCIL_BACK_FAIL = 0x8801 STENCIL_BACK_FUNC = 0x8800 STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 STENCIL_BACK_REF = 0x8CA3 STENCIL_BACK_VALUE_MASK = 0x8CA4 STENCIL_BACK_WRITEMASK = 0x8CA5 STENCIL_BITS = 0x0D57 STENCIL_BUFFER_BIT = 0x00000400 STENCIL_CLEAR_VALUE = 0x0B91 STENCIL_FAIL = 0x0B94 STENCIL_FUNC = 0x0B92 STENCIL_PASS_DEPTH_FAIL = 0x0B95 STENCIL_PASS_DEPTH_PASS = 0x0B96 STENCIL_REF = 0x0B97 STENCIL_TEST = 0x0B90 STENCIL_VALUE_MASK = 0x0B93 STENCIL_WRITEMASK = 0x0B98 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 UNSIGNED_BYTE = 0x1401 UNSIGNED_INT = 0x1405 VENDOR = 0x1F00 VERSION = 0x1F02 VERTEX_SHADER = 0x8B31 VIEWPORT = 0x0BA2 ZERO = 0 )
Variables ¶
This section is empty.
Functions ¶
func AttachShader ¶
Attaches a shader object to a program object
func BindFramebuffer ¶
bind a framebuffer to a framebuffer target
func BindRenderbuffer ¶
bind a renderbuffer to a renderbuffer target
func BindTexture ¶
bind a named texture to a texturing target
func BlendColor ¶
set the blend color
func BlendEquationSeparate ¶
set the RGB blend equation and the alpha blend equation separately
func BlendFuncSeparate ¶
func BlendFuncSeparate(sfactorRGB uint32, dfactorRGB uint32, sfactorAlpha uint32, dfactorAlpha uint32)
specify pixel arithmetic for RGB and alpha components separately
func BufferData ¶
creates and initializes a buffer object's data store
func CheckFramebufferStatus ¶
check the completeness status of a framebuffer
func ClearColor ¶
specify clear values for the color buffers
func ClearDepthf ¶
func ClearDepthf(d float32)
func CullFace ¶
func CullFace(mode uint32)
specify whether front- or back-facing facets can be culled
func DeleteFramebuffers ¶
delete framebuffer objects
func DeleteRenderbuffers ¶
delete renderbuffer objects
func DisableVertexAttribArray ¶
func DisableVertexAttribArray(index uint32)
Enable or disable a generic vertex attribute array
func DrawArrays ¶
render primitives from array data
func DrawElements ¶
render primitives from array data
func EnableVertexAttribArray ¶
func EnableVertexAttribArray(index uint32)
Enable or disable a generic vertex attribute array
func FramebufferRenderbuffer ¶
func FramebufferRenderbuffer(target uint32, attachment uint32, renderbuffertarget uint32, renderbuffer uint32)
attach a renderbuffer as a logical buffer of a framebuffer object
func FramebufferTexture2D ¶
func GenFramebuffers ¶
generate framebuffer object names
func GenRenderbuffers ¶
generate renderbuffer object names
func GenerateMipmap ¶
func GenerateMipmap(target uint32)
generate mipmaps for a specified texture object
func GetAttribLocation ¶
Returns the location of an attribute variable
func GetBooleanv ¶
func GetIntegerv ¶
func GetProgramInfoLog ¶
Returns the information log for a program object
func GetProgramiv ¶
Returns a parameter from a program object
func GetShaderInfoLog ¶
Returns the information log for a shader object
func GetShaderiv ¶
Returns a parameter from a shader object
func GetUniformLocation ¶
Returns the location of a uniform variable
func GoStr ¶
GoStr takes a null-terminated string returned by OpenGL and constructs a corresponding Go string.
func InitWithProcAddrFunc ¶
InitWithProcAddrFunc intializes the package using the specified OpenGL function pointer loading function. For more cases Init should be used instead.
func Ptr ¶
Ptr takes a slice or pointer (to a singular scalar value or the first element of an array or slice) and returns its GL-compatible address.
func PtrOffset ¶
PtrOffset takes a pointer offset and returns a GL-compatible pointer. Useful for functions such as glVertexAttribPointer that take pointer parameters indicating an offset rather than an absolute memory address.
func ReadPixels ¶
func ReadPixels(x int32, y int32, width int32, height int32, format uint32, xtype uint32, pixels unsafe.Pointer)
read a block of pixels from the frame buffer
func ShaderSource ¶
Replaces the source code in a shader object
func StencilFuncSeparate ¶
set front and/or back function and reference value for stencil testing
func StencilMaskSeparate ¶
control the front and/or back writing of individual bits in the stencil planes
func StencilOpSeparate ¶
set front and/or back stencil test actions
func Str ¶
Str takes a null-terminated Go string and returns its GL-compatible address. This function reaches into Go string storage in an unsafe way so the caller must ensure the string is not garbage collected.
func Strs ¶
Strs takes a list of null-terminated Go strings and return's their C counterpart.
The returned free function must be called once you are done using the strings in order to free the memory.
If no strings are provided as a parameter, or if any string is not null-terminated, this function will panic.
func TexImage2D ¶
func TexImage2D(target uint32, level int32, internalformat int32, width int32, height int32, border int32, format uint32, xtype uint32, pixels unsafe.Pointer)
specify a two-dimensional texture image
func TexParameterfv ¶
func TexParameteri ¶
func Uniform1fv ¶
Specify the value of a uniform variable for the current program object
func Uniform1iv ¶
Specify the value of a uniform variable for the current program object
func Uniform2fv ¶
Specify the value of a uniform variable for the current program object
func Uniform3fv ¶
Specify the value of a uniform variable for the current program object
func Uniform4fv ¶
Specify the value of a uniform variable for the current program object
func UniformMatrix4fv ¶
Specify the value of a uniform variable for the current program object
func UseProgram ¶
func UseProgram(program uint32)
Installs a program object as part of current rendering state
Types ¶
This section is empty.