func StencilOpSeparate(face, sfail, dpfail, dppass Enum) {
	gl.StencilOpSeparate(uint32(face), uint32(sfail), uint32(dpfail), uint32(dppass))
}
StencilOpSeparate sets front or back stencil tests.

http://www.khronos.org/opengles/sdk/docs/man3/html/glStencilOpSeparate.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])
}
func GetInteger(pname Enum) int {
	var data int32
	gl.GetIntegerv(uint32(pname), &data)
	return int(data)
}
func GetBufferParameteri(target, pname Enum) int {
	var params int32
	gl.GetBufferParameteriv(uint32(target), uint32(pname), &params)
	return int(params)
}
func GetError() Enum {
	return Enum(gl.GetError())
}
func GetBoundFramebuffer() Framebuffer {
	var b int32
	gl.GetIntegerv(FRAMEBUFFER_BINDING, &b)
	return Framebuffer{Value: uint32(b)}
}
func GetFramebufferAttachmentParameteri(target, attachment, pname Enum) int {
	log.Println("GetFramebufferAttachmentParameteri: not yet tested (TODO: remove this after it's confirmed to work. Your feedback is welcome.)")
	var param int32
	gl.GetFramebufferAttachmentParameteriv(uint32(target), uint32(attachment), uint32(pname), &param)
	return int(param)
}
func GetProgrami(p Program, pname Enum) int {
	var result int32
	gl.GetProgramiv(p.Value, uint32(pname), &result)
	return int(result)
}
func GetProgramInfoLog(p Program) string {
	var logLength int32
	gl.GetProgramiv(p.Value, gl.INFO_LOG_LENGTH, &logLength)
	if logLength == 0 {
		return ""
	}
	logBuffer := make([]uint8, logLength)
	gl.GetProgramInfoLog(p.Value, logLength, nil, &logBuffer[0])
	return gl.GoStr(&logBuffer[0])
}
func GetRenderbufferParameteri(target, pname Enum) int {
	log.Println("GetRenderbufferParameteri: not yet tested (TODO: remove this after it's confirmed to work. Your feedback is welcome.)")
	var result int32
	gl.GetRenderbufferParameteriv(uint32(target), uint32(pname), &result)
	return int(result)
}
func GetShaderi(s Shader, pname Enum) int {
	var result int32
	gl.GetShaderiv(s.Value, uint32(pname), &result)
	return int(result)
}
func GetShaderInfoLog(s Shader) string {
	var logLength int32
	gl.GetShaderiv(s.Value, gl.INFO_LOG_LENGTH, &logLength)
	if logLength == 0 {
		return ""
	}
	logBuffer := make([]uint8, logLength)
	gl.GetShaderInfoLog(s.Value, logLength, nil, &logBuffer[0])
	return gl.GoStr(&logBuffer[0])
}
func GetShaderPrecisionFormat(shadertype, precisiontype Enum) (rangeLow, rangeHigh, precision int) {
	log.Println("GetShaderPrecisionFormat: not yet tested (TODO: remove this after it's confirmed to work. Your feedback is welcome.)")
	var cRange [2]int32
	var cPrecision int32
	gl.GetShaderPrecisionFormat(uint32(shadertype), uint32(precisiontype), &cRange[0], &cPrecision)
	return int(cRange[0]), int(cRange[1]), int(cPrecision)
}
func GetShaderSource(s Shader) string {
	log.Println("GetShaderSource: not yet tested (TODO: remove this after it's confirmed to work. Your feedback is welcome.)")
	sourceLen := GetShaderi(s, gl.SHADER_SOURCE_LENGTH)
	if sourceLen == 0 {
		return ""
	}
	buf := make([]byte, sourceLen)
	gl.GetShaderSource(s.Value, int32(sourceLen), nil, &buf[0])
	return string(buf)
}
func GetString(pname Enum) string {
	return gl.GoStr(gl.GetString(uint32(pname)))
}
func GetTexParameterfv(dst []float32, target, pname Enum) {
	gl.GetTexParameterfv(uint32(target), uint32(pname), &dst[0])
}
func GetTexParameteriv(dst []int32, target, pname Enum) {
	gl.GetTexParameteriv(uint32(target), uint32(pname), &dst[0])
}
func GetUniformfv(dst []float32, src Uniform, p Program) {
	gl.GetUniformfv(p.Value, src.Value, &dst[0])
}
func GetUniformiv(dst []int32, src Uniform, p Program) {
	gl.GetUniformiv(p.Value, src.Value, &dst[0])
}
func GetUniformLocation(p Program, name string) Uniform {
	return Uniform{Value: gl.GetUniformLocation(p.Value, gl.Str(name+"\x00"))}
}
func GetVertexAttribf(src Attrib, pname Enum) float32 {
	log.Println("GetVertexAttribf: not yet tested (TODO: remove this after it's confirmed to work. Your feedback is welcome.)")
	var result float32
	gl.GetVertexAttribfv(uint32(src.Value), uint32(pname), &result)
	return result
}
func GetVertexAttribfv(dst []float32, src Attrib, pname Enum) {
	gl.GetVertexAttribfv(uint32(src.Value), uint32(pname), &dst[0])
}
func GetVertexAttribi(src Attrib, pname Enum) int32 {
	var result int32
	gl.GetVertexAttribiv(uint32(src.Value), uint32(pname), &result)
	return result
}
func GetVertexAttribiv(dst []int32, src Attrib, pname Enum) {
	gl.GetVertexAttribiv(uint32(src.Value), uint32(pname), &dst[0])
}
func Hint(target, mode Enum) {
	gl.Hint(uint32(target), uint32(mode))
}
func IsBuffer(b Buffer) bool {
	return gl.IsBuffer(b.Value)
}
func IsEnabled(cap Enum) bool {
	return gl.IsEnabled(uint32(cap))
}
func IsFramebuffer(fb Framebuffer) bool {
	return gl.IsFramebuffer(fb.Value)
}
func IsProgram(p Program) bool {
	return gl.IsProgram(p.Value)
}
func IsRenderbuffer(rb Renderbuffer) bool {
	return gl.IsRenderbuffer(rb.Value)
}
func IsShader(s Shader) bool {
	return gl.IsShader(s.Value)
}
func IsTexture(t Texture) bool {
	return gl.IsTexture(t.Value)
}
func LineWidth(width float32) {
	gl.LineWidth(width)
}
func LinkProgram(p Program) {
	gl.LinkProgram(p.Value)
}
func PixelStorei(pname Enum, param int32) {
	gl.PixelStorei(uint32(pname), param)
}
func PolygonOffset(factor, units float32) {
	gl.PolygonOffset(factor, units)
}
func ReadPixels(dst []byte, x, y, width, height int, format, ty Enum) {
	gl.ReadPixels(int32(x), int32(y), int32(width), int32(height), uint32(format), uint32(ty), gl.Ptr(&dst[0]))
}
func ReleaseShaderCompiler() {
	gl.ReleaseShaderCompiler()
}
func RenderbufferStorage(target, internalFormat Enum, width, height int) {
	gl.RenderbufferStorage(uint32(target), uint32(internalFormat), int32(width), int32(height))
}
func SampleCoverage(value float32, invert bool) {
	gl.SampleCoverage(value, invert)
}
func Scissor(x, y, width, height int32) {
	gl.Scissor(x, y, width, height)
}
func ShaderSource(s Shader, src string) {
	glsource, free := gl.Strs(src + "\x00")
	gl.ShaderSource(s.Value, 1, glsource, nil)
	free()
}
func StencilFunc(fn Enum, ref int, mask uint32) {
	gl.StencilFunc(uint32(fn), int32(ref), mask)
}
func StencilFuncSeparate(face, fn Enum, ref int, mask uint32) {
	gl.StencilFuncSeparate(uint32(face), uint32(fn), int32(ref), mask)
}
func StencilMask(mask uint32) {
	gl.StencilMask(mask)
}
func StencilMaskSeparate(face Enum, mask uint32) {
	gl.StencilMaskSeparate(uint32(face), mask)
}
func StencilOp(fail, zfail, zpass Enum) {
	gl.StencilOp(uint32(fail), uint32(zfail), uint32(zpass))
}