go-opengl-pixel/pixelgl/orphan.go

14 lines
295 B
Go
Raw Normal View History

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.
func Clear(r, g, b, a float32) {
2016-11-24 07:24:17 -06:00
DoNoBlock(func() {
gl.ClearColor(r, g, b, a)
2016-11-24 07:24:17 -06:00
gl.Clear(gl.COLOR_BUFFER_BIT)
})
}