示例#1
0
func (s *StencilOp) Mask(level int) *StencilOp {
	gl.StencilFunc(gl.EQUAL, gl.Int(level), ^gl.Uint(0))
	return s
}
示例#2
0
func (s *StencilOp) Unmask(level int) *StencilOp {
	gl.StencilFunc(gl.ALWAYS, gl.Int(level), ^gl.Uint(0))
	return s
}
示例#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))
}