ebiten: refactoring

This commit is contained in:
Hajime Hoshi 2022-02-27 22:21:57 +09:00
parent 77f765d483
commit 99f8e335ee
2 changed files with 2 additions and 6 deletions

View File

@ -22,7 +22,3 @@ func init() {
// TODO: Should graphics() be moved to the graphicscommand package?
graphicscommand.SetGraphicsDriver(graphics())
}
func NeedsInvertY() bool {
return graphicscommand.NeedsInvertY()
}

View File

@ -22,11 +22,11 @@ import (
"strings"
"github.com/hajimehoshi/ebiten/v2/internal/graphics"
"github.com/hajimehoshi/ebiten/v2/internal/graphicscommand"
"github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver"
"github.com/hajimehoshi/ebiten/v2/internal/mipmap"
"github.com/hajimehoshi/ebiten/v2/internal/shader"
"github.com/hajimehoshi/ebiten/v2/internal/shaderir"
"github.com/hajimehoshi/ebiten/v2/internal/ui"
)
var shaderSuffix string
@ -126,7 +126,7 @@ func NewShader(src []byte) (*Shader, error) {
var buf bytes.Buffer
buf.Write(src)
buf.WriteString(shaderSuffix)
if ui.NeedsInvertY() {
if graphicscommand.NeedsInvertY() {
buf.WriteString(`
func __vertex(position vec2, texCoord vec2, color vec4) (vec4, vec2, vec4) {
return mat4(