mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
opengl: Refactoring
This commit is contained in:
parent
847ba9de0c
commit
71ca838193
@ -19,19 +19,14 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
zeroPlus float32
|
||||
oneMinus float32
|
||||
)
|
||||
|
||||
func init() {
|
||||
zeroPlus = math.Nextafter32(0, 1)
|
||||
oneMinus = math.Nextafter32(1, 0)
|
||||
}
|
||||
)
|
||||
|
||||
// adjustForClearColor adjust the value x for glClearColor function.
|
||||
//
|
||||
// On some machines like MacBook Pro, exact 0 and exact 1 might cause problems
|
||||
// at glClear() (#452).
|
||||
// at glClearColor() (#452).
|
||||
func adjustForClearColor(x float32) float32 {
|
||||
if x <= 0 {
|
||||
return zeroPlus
|
||||
|
Loading…
Reference in New Issue
Block a user