mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
opengl: Refactoring: Use value type for theContext
This commit is contained in:
parent
f7fa4ed8f9
commit
02b570a8e1
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user