Example #1
0
func (s *StencilOp) Mask(level int) *StencilOp {
	gl.StencilFunc(gl.EQUAL, gl.Int(level), ^gl.Uint(0))
	return s
}
Example #2
0
func (s *StencilOp) Unmask(level int) *StencilOp {
	gl.StencilFunc(gl.ALWAYS, gl.Int(level), ^gl.Uint(0))
	return s
}
Example #3
0
func AttachTexture(location gl.UniformLocation, textureEnum gl.Enum, target gl.Enum, texture gl.Texture) {
	gl.ActiveTexture(textureEnum)
	gl.BindTexture(target, texture)
	gl.Uniform1i(location, gl.Int(textureEnum-gl.TEXTURE0))
}