diff --git a/internal/opengl/context.go b/internal/opengl/context.go index 92d21be0c..1117db7a3 100644 --- a/internal/opengl/context.go +++ b/internal/opengl/context.go @@ -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