2016-11-24 07:24:17 -06:00
|
|
|
package pixelgl
|
|
|
|
|
|
|
|
import "github.com/go-gl/gl/v3.3-core/gl"
|
|
|
|
|
2016-11-25 17:31:20 -06:00
|
|
|
// This file defines functions that can operate without a parent Doer.
|
2016-11-24 07:24:17 -06:00
|
|
|
|
2016-12-01 10:49:40 -06:00
|
|
|
// Clear clears the current OpenGL context.
|
2016-12-01 10:48:52 -06:00
|
|
|
func Clear(r, g, b, a float32) {
|
2016-11-24 07:24:17 -06:00
|
|
|
DoNoBlock(func() {
|
2016-12-01 10:48:52 -06:00
|
|
|
gl.ClearColor(r, g, b, a)
|
2016-11-24 07:24:17 -06:00
|
|
|
gl.Clear(gl.COLOR_BUFFER_BIT)
|
|
|
|
})
|
|
|
|
}
|