Documentation ¶
Overview ¶
Package gl 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 27874
Index ¶
- Constants
- func ActiveTexture(texture uint32)
- func AttachShader(program uint32, shader uint32)
- func BeginQuery(target uint32, id 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 ClearDepth(depth float64)
- 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 DeleteQueries(n int32, ids *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 EndQuery(target 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 GenQueries(n int32, ids *uint32)
- func GenRenderbuffers(n int32, renderbuffers *uint32)
- func GenTextures(n int32, textures *uint32)
- func GenerateMipmap(target uint32)
- func GetAttribLocation(program uint32, name *int8) int32
- func GetBooleanv(pname uint32, data *bool)
- func GetDoublev(pname uint32, data *float64)
- func GetFloatv(pname uint32, data *float32)
- func GetIntegerv(pname uint32, data *int32)
- func GetProgramInfoLog(program uint32, bufSize int32, length *int32, infoLog *int8)
- func GetProgramiv(program uint32, pname uint32, params *int32)
- func GetQueryObjectiv(id uint32, pname uint32, params *int32)
- func GetQueryiv(target uint32, pname uint32, params *int32)
- func GetShaderInfoLog(shader uint32, bufSize int32, length *int32, infoLog *int8)
- func GetShaderiv(shader uint32, pname uint32, params *int32)
- func GetString(name uint32) *uint8
- func GetUniformLocation(program uint32, name *int8) int32
- func GoStr(cstr *uint8) string
- func Init() error
- func InitWithProcAddrFunc(getProcAddr procaddr.GetProcAddressFunc) 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 RenderbufferStorageMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32)
- func Scissor(x int32, y int32, width int32, height int32)
- func ShaderSource(shader uint32, count int32, xstring **int8, 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) *int8
- 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 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 BGRA = 0x80E1 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_BORDER = 0x812D 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 DECR = 0x1E03 DECR_WRAP = 0x8508 DEPTH24_STENCIL8 = 0x88F0 DEPTH_ATTACHMENT = 0x8D00 DEPTH_BITS = 0x0D56 DEPTH_BUFFER_BIT = 0x00000100 DEPTH_CLEAR_VALUE = 0x0B73 DEPTH_COMPONENT = 0x1902 DEPTH_COMPONENT16 = 0x81A5 DEPTH_COMPONENT24 = 0x81A6 DEPTH_COMPONENT32 = 0x81A7 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_DRAW_BUFFER = 0x8CDB FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7 FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56 FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC FRAMEBUFFER_UNDEFINED = 0x8219 FRAMEBUFFER_UNSUPPORTED = 0x8CDD FRONT = 0x0404 FRONT_AND_BACK = 0x0408 FUNC_ADD = 0x8006 FUNC_REVERSE_SUBTRACT = 0x800B FUNC_SUBTRACT = 0x800A GENERATE_MIPMAP = 0x8191 GEQUAL = 0x0206 GREATER = 0x0204 GREEN_BITS = 0x0D53 INCR = 0x1E02 INCR_WRAP = 0x8507 INFO_LOG_LENGTH = 0x8B84 INVERT = 0x150A KEEP = 0x1E00 LEQUAL = 0x0203 LESS = 0x0201 LINEAR = 0x2601 LINEAR_MIPMAP_LINEAR = 0x2703 LINEAR_MIPMAP_NEAREST = 0x2701 LINK_STATUS = 0x8B82 MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49 MAX_SAMPLES = 0x8D57 MAX_TEXTURE_SIZE = 0x0D33 MAX_VARYING_FLOATS = 0x8B4B MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A MIRRORED_REPEAT = 0x8370 MULTISAMPLE = 0x809D NEAREST = 0x2600 NEAREST_MIPMAP_LINEAR = 0x2702 NEAREST_MIPMAP_NEAREST = 0x2700 NEVER = 0x0200 NOTEQUAL = 0x0205 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 QUERY_COUNTER_BITS = 0x8864 QUERY_RESULT = 0x8866 QUERY_RESULT_AVAILABLE = 0x8867 RED_BITS = 0x0D52 RENDERBUFFER = 0x8D41 RENDERER = 0x1F01 REPEAT = 0x2901 REPLACE = 0x1E01 RGB = 0x1907 RGB8 = 0x8051 RGBA = 0x1908 RGBA8 = 0x8058 SAMPLES = 0x80A9 SAMPLES_PASSED = 0x8914 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 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_BASE_LEVEL = 0x813C TEXTURE_BORDER_COLOR = 0x1004 TEXTURE_MAG_FILTER = 0x2800 TEXTURE_MAX_LEVEL = 0x813D 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 BeginQuery ¶
delimit the boundaries of a query 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 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 GetDoublev ¶
func GetIntegerv ¶
func GetProgramInfoLog ¶
Returns the information log for a program object
func GetProgramiv ¶
Returns a parameter from a program object
func GetQueryObjectiv ¶
func GetQueryiv ¶
return parameters of a query object target
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 ¶
func InitWithProcAddrFunc(getProcAddr procaddr.GetProcAddressFunc) error
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 RenderbufferStorageMultisample ¶
func RenderbufferStorageMultisample(target uint32, samples int32, internalformat uint32, width int32, height int32)
establish data storage, format, dimensions and sample count of a renderbuffer object's image
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 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 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.