opengl: Refactoring: Use value type for theContext

This commit is contained in:
Hajime Hoshi 2018-11-05 00:46:32 +09:00
parent f7fa4ed8f9
commit 02b570a8e1

View File

@ -15,16 +15,9 @@
package opengl package opengl
import ( import (
"math"
"github.com/hajimehoshi/ebiten/internal/graphics" "github.com/hajimehoshi/ebiten/internal/graphics"
) )
var (
zeroPlus = math.Nextafter32(0, 1)
oneMinus = math.Nextafter32(1, 0)
)
var ( var (
vertexShader shaderType vertexShader shaderType
fragmentShader shaderType fragmentShader shaderType
@ -74,10 +67,10 @@ type Context struct {
context context
} }
var theContext = &Context{} var theContext Context
func GetContext() *Context { func GetContext() *Context {
return theContext return &theContext
} }
func (c *Context) bindTexture(t textureNative) { func (c *Context) bindTexture(t textureNative) {