SetBackground sets the OpenGL ClearColor to the provided color.
(c color.Color)
| 408 | |
| 409 | // SetBackground sets the OpenGL ClearColor to the provided color. |
| 410 | func SetBackground(c color.Color) { |
| 411 | if !engo.Headless() { |
| 412 | r, g, b, a := c.RGBA() |
| 413 | |
| 414 | engo.Gl.ClearColor(float32(r)/0xffff, float32(g)/0xffff, float32(b)/0xffff, float32(a)/0xffff) |
| 415 | } |
| 416 | } |