From 71ca838193e6be16f873b8f4472bc6c2fb54462f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 3 Dec 2017 03:55:07 +0900 Subject: [PATCH] opengl: Refactoring --- internal/opengl/context.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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