func GetInteger(pname Enum) int {
	var data int32
	gl.GetIntegerv(uint32(pname), &data)
	return int(data)
}
GetInteger returns the int value of parameter pname.

http://www.khronos.org/opengles/sdk/docs/man3/html/glGet.xhtml
package gl
import (
	"log"
	"strings"
	"unsafe"
	"github.com/go-gl/gl/v2.1/gl"
)
var ContextWatcher = new(contextWatcher)
type contextWatcher struct {
	initGL bool
}
func (cw *contextWatcher) OnMakeCurrent(context interface{}) {
	if !cw.initGL {
		err := gl.Init()
		if err != nil {
			log.Fatalln("gl.Init:", err)
		}
		cw.initGL = true
	}
}
func (contextWatcher) OnDetach() {}
func ActiveTexture(texture Enum) {
	gl.ActiveTexture(uint32(texture))
}
func AttachShader(p Program, s Shader) {
	gl.AttachShader(p.Value, s.Value)
}
func BindAttribLocation(p Program, a Attrib, name string) {
	gl.BindAttribLocation(p.Value, uint32(a.Value), gl.Str(name+"\x00"))
}
func BindBuffer(target Enum, b Buffer) {
	gl.BindBuffer(uint32(target), b.Value)
}
func BindFramebuffer(target Enum, fb Framebuffer) {
	gl.BindFramebuffer(uint32(target), fb.Value)
}
func BindRenderbuffer(target Enum, rb Renderbuffer) {
	gl.BindRenderbuffer(uint32(target), rb.Value)
}
func BindTexture(target Enum, t Texture) {
	gl.BindTexture(uint32(target), t.Value)
}
func BlendColor(red, green, blue, alpha float32) {
	gl.BlendColor(red, green, blue, alpha)
}
func BlendEquation(mode Enum) {
	gl.BlendEquation(uint32(mode))
}
func BlendEquationSeparate(modeRGB, modeAlpha Enum) {
	gl.BlendEquationSeparate(uint32(modeRGB), uint32(modeAlpha))
}
func BlendFunc(sfactor, dfactor Enum) {
	gl.BlendFunc(uint32(sfactor), uint32(dfactor))
}
func BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha Enum) {
	gl.BlendFuncSeparate(uint32(sfactorRGB), uint32(dfactorRGB), uint32(sfactorAlpha), uint32(dfactorAlpha))
}
func BufferData(target Enum, src []byte, usage Enum) {
	gl.BufferData(uint32(target), int(len(src)), gl.Ptr(&src[0]), uint32(usage))
}
func BufferInit(target Enum, size int, usage Enum) {
	gl.BufferData(uint32(target), size, nil, uint32(usage))
}
func BufferSubData(target Enum, offset int, data []byte) {
	gl.BufferSubData(uint32(target), offset, int(len(data)), gl.Ptr(&data[0]))
}
func CheckFramebufferStatus(target Enum) Enum {
	return Enum(gl.CheckFramebufferStatus(uint32(target)))
}
func Clear(mask Enum) {
	gl.Clear(uint32(mask))
}
func ClearColor(red, green, blue, alpha float32) {
	gl.ClearColor(red, green, blue, alpha)
}
func ClearDepthf(d float32) {
	gl.ClearDepthf(d)
}
func ClearStencil(s int) {
	gl.ClearStencil(int32(s))
}
func ColorMask(red, green, blue, alpha bool) {
	gl.ColorMask(red, green, blue, alpha)
}
func CompileShader(s Shader) {
	gl.CompileShader(s.Value)
}
func CompressedTexImage2D(target Enum, level int, internalformat Enum, width, height, border int, data []byte) {
	gl.CompressedTexImage2D(uint32(target), int32(level), uint32(internalformat), int32(width), int32(height), int32(border), int32(len(data)), gl.Ptr(data))
}
func CompressedTexSubImage2D(target Enum, level, xoffset, yoffset, width, height int, format Enum, data []byte) {
	gl.CompressedTexSubImage2D(uint32(target), int32(level), int32(xoffset), int32(yoffset), int32(width), int32(height), uint32(format), int32(len(data)), gl.Ptr(data))
}
func CopyTexImage2D(target Enum, level int, internalformat Enum, x, y, width, height, border int) {
	gl.CopyTexImage2D(uint32(target), int32(level), uint32(internalformat), int32(x), int32(y), int32(width), int32(height), int32(border))
}
func CopyTexSubImage2D(target Enum, level, xoffset, yoffset, x, y, width, height int) {
	gl.CopyTexSubImage2D(uint32(target), int32(level), int32(xoffset), int32(yoffset), int32(x), int32(y), int32(width), int32(height))
}
func CreateBuffer() Buffer {
	var b Buffer
	gl.GenBuffers(1, &b.Value)
	return b
}
func CreateFramebuffer() Framebuffer {
	var b Framebuffer
	gl.GenFramebuffers(1, &b.Value)
	return b
}
func CreateProgram() Program {
	return Program{Value: uint32(gl.CreateProgram())}
}
func CreateRenderbuffer() Renderbuffer {
	var b Renderbuffer
	gl.GenRenderbuffers(1, &b.Value)
	return b
}
func CreateShader(ty Enum) Shader {
	return Shader{Value: uint32(gl.CreateShader(uint32(ty)))}
}
func CreateTexture() Texture {
	var t Texture
	gl.GenTextures(1, &t.Value)
	return t
}
func CullFace(mode Enum) {
	gl.CullFace(uint32(mode))
}
func DeleteBuffer(v Buffer) {
	gl.DeleteBuffers(1, &v.Value)
}
func DeleteFramebuffer(v Framebuffer) {
	gl.DeleteFramebuffers(1, &v.Value)
}
func DeleteProgram(p Program) {
	gl.DeleteProgram(p.Value)
}
func DeleteRenderbuffer(v Renderbuffer) {
	gl.DeleteRenderbuffers(1, &v.Value)
}
func DeleteShader(s Shader) {
	gl.DeleteShader(s.Value)
}
func DeleteTexture(v Texture) {
	gl.DeleteTextures(1, &v.Value)
}
func DepthFunc(fn Enum) {
	gl.DepthFunc(uint32(fn))
}
func DepthMask(flag bool) {
	gl.DepthMask(flag)
}
func DepthRangef(n, f float32) {
	gl.DepthRangef(n, f)
}
func DetachShader(p Program, s Shader) {
	gl.DetachShader(p.Value, s.Value)
}
func Disable(cap Enum) {
	gl.Disable(uint32(cap))
}
func DisableVertexAttribArray(a Attrib) {
	gl.DisableVertexAttribArray(uint32(a.Value))
}
func DrawArrays(mode Enum, first, count int) {
	gl.DrawArrays(uint32(mode), int32(first), int32(count))
}
func DrawElements(mode Enum, count int, ty Enum, offset int) {
	gl.DrawElements(uint32(mode), int32(count), uint32(ty), gl.PtrOffset(offset))
}
func Enable(cap Enum) {
	gl.Enable(uint32(cap))
}
func EnableVertexAttribArray(a Attrib) {
	gl.EnableVertexAttribArray(uint32(a.Value))
}
func Finish() {
	gl.Finish()
}
func Flush() {
	gl.Flush()
}
func FramebufferRenderbuffer(target, attachment, rbTarget Enum, rb Renderbuffer) {
	gl.FramebufferRenderbuffer(uint32(target), uint32(attachment), uint32(rbTarget), rb.Value)
}
func FramebufferTexture2D(target, attachment, texTarget Enum, t Texture, level int) {
	gl.FramebufferTexture2D(uint32(target), uint32(attachment), uint32(texTarget), t.Value, int32(level))
}
func FrontFace(mode Enum) {
	gl.FrontFace(uint32(mode))
}
func GenerateMipmap(target Enum) {
	gl.GenerateMipmap(uint32(target))
}
func GetActiveAttrib(p Program, index uint32) (name string, size int, ty Enum) {
	var length, si int32
	var typ uint32
	name = strings.Repeat("\x00", 256)
	cname := gl.Str(name)
	gl.GetActiveAttrib(p.Value, uint32(index), int32(len(name)-1), &length, &si, &typ, cname)
	name = name[:strings.IndexRune(name, 0)]
	return name, int(si), Enum(typ)
}
func GetActiveUniform(p Program, index uint32) (name string, size int, ty Enum) {
	var length, si int32
	var typ uint32
	name = strings.Repeat("\x00", 256)
	cname := gl.Str(name)
	gl.GetActiveUniform(p.Value, uint32(index), int32(len(name)-1), &length, &si, &typ, cname)
	name = name[:strings.IndexRune(name, 0)]
	return name, int(si), Enum(typ)
}
func GetAttachedShaders(p Program) []Shader {
	log.Println("GetAttachedShaders: not yet tested (TODO: remove this after it's confirmed to work. Your feedback is welcome.)")
	shadersLen := GetProgrami(p, ATTACHED_SHADERS)
	var n int32
	buf := make([]uint32, shadersLen)
	gl.GetAttachedShaders(uint32(p.Value), int32(shadersLen), &n, &buf[0])
	buf = buf[:int(n)]
	shaders := make([]Shader, int(n))
	for i, s := range buf {
		shaders[i] = Shader{Value: uint32(s)}
	}
	return shaders
}
func GetAttribLocation(p Program, name string) Attrib {
	return Attrib{Value: uint(gl.GetAttribLocation(p.Value, gl.Str(name+"\x00")))}
}
func GetBooleanv(dst []bool, pname Enum) {
	gl.GetBooleanv(uint32(pname), &dst[0])
}
func GetFloatv(dst []float32, pname Enum) {
	gl.GetFloatv(uint32(pname), &dst[0])
}
func GetIntegerv(pname Enum, data []int32) {
	gl.GetIntegerv(uint32(pname), &data[0])
}