add orphan function Clear

This commit is contained in:
faiface 2016-11-24 14:24:17 +01:00
parent c6c3e020a4
commit 08af9e4010
1 changed files with 13 additions and 0 deletions

13
pixelgl/orphan.go Normal file
View File

@ -0,0 +1,13 @@
package pixelgl
import "github.com/go-gl/gl/v3.3-core/gl"
// This file defines functions that can operate without a parent BeginEnder.
// Clear clears the current context..
func Clear(r, g, b, a float64) {
DoNoBlock(func() {
gl.ClearColor(float32(r), float32(g), float32(b), float32(a))
gl.Clear(gl.COLOR_BUFFER_BIT)
})
}