From 99f8e335eeb6fff02c842025125520f452f8e727 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 27 Feb 2022 22:21:57 +0900 Subject: [PATCH] ebiten: refactoring --- internal/ui/init.go | 4 ---- shader.go | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/ui/init.go b/internal/ui/init.go index 77c107f62..620c20356 100644 --- a/internal/ui/init.go +++ b/internal/ui/init.go @@ -22,7 +22,3 @@ func init() { // TODO: Should graphics() be moved to the graphicscommand package? graphicscommand.SetGraphicsDriver(graphics()) } - -func NeedsInvertY() bool { - return graphicscommand.NeedsInvertY() -} diff --git a/shader.go b/shader.go index c7574d58a..bc91cc846 100644 --- a/shader.go +++ b/shader.go @@ -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(