fixed xmobile backend

This commit is contained in:
Thomas Friedel 2019-05-05 10:29:15 +02:00
parent 505386f199
commit c945678725
7 changed files with 7 additions and 7 deletions

View file

@ -3,7 +3,7 @@ package xmobilebackend
import ( import (
"unsafe" "unsafe"
"github.com/tfriedel6/canvas/backend/goglbackend/gl" "golang.org/x/mobile/gl"
) )
func (b *XMobileBackend) ClearClip() { func (b *XMobileBackend) ClearClip() {

View file

@ -6,7 +6,7 @@ import (
"unsafe" "unsafe"
"github.com/tfriedel6/canvas/backend/backendbase" "github.com/tfriedel6/canvas/backend/backendbase"
"github.com/tfriedel6/canvas/backend/goglbackend/gl" "golang.org/x/mobile/gl"
) )
func (b *XMobileBackend) Clear(pts [4][2]float64) { func (b *XMobileBackend) Clear(pts [4][2]float64) {

View file

@ -73,7 +73,7 @@ func main() {
func rewrite(filename, src string) (string, string) { func rewrite(filename, src string) (string, string) {
src = strings.Replace(src, `package goglbackend`, `package xmobilebackend`, 1) src = strings.Replace(src, `package goglbackend`, `package xmobilebackend`, 1)
src = strings.Replace(src, `"github.com/tfriedel6/canvas/backend/gogl/gl"`, `"golang.org/x/mobile/gl"`, 1) src = strings.Replace(src, `"github.com/tfriedel6/canvas/backend/goglbackend/gl"`, `"golang.org/x/mobile/gl"`, 1)
src = strings.Replace(src, "\tgl.", "\tb.glctx.", -1) src = strings.Replace(src, "\tgl.", "\tb.glctx.", -1)
src = strings.Replace(src, "GoGLBackend", "XMobileBackend", -1) src = strings.Replace(src, "GoGLBackend", "XMobileBackend", -1)
src = strings.Replace(src, "uint32(gl.TRIANGLES)", "gl.Enum(gl.TRIANGLES)", -1) src = strings.Replace(src, "uint32(gl.TRIANGLES)", "gl.Enum(gl.TRIANGLES)", -1)

View file

@ -4,7 +4,7 @@ import (
"runtime" "runtime"
"github.com/tfriedel6/canvas/backend/backendbase" "github.com/tfriedel6/canvas/backend/backendbase"
"github.com/tfriedel6/canvas/backend/goglbackend/gl" "golang.org/x/mobile/gl"
) )
// LinearGradient is a gradient with any number of // LinearGradient is a gradient with any number of

View file

@ -5,7 +5,7 @@ import (
"image/color" "image/color"
"unsafe" "unsafe"
"github.com/tfriedel6/canvas/backend/goglbackend/gl" "golang.org/x/mobile/gl"
) )
// GetImageData returns an RGBA image of the current image // GetImageData returns an RGBA image of the current image

View file

@ -7,7 +7,7 @@ import (
"unsafe" "unsafe"
"github.com/tfriedel6/canvas/backend/backendbase" "github.com/tfriedel6/canvas/backend/backendbase"
"github.com/tfriedel6/canvas/backend/goglbackend/gl" "golang.org/x/mobile/gl"
) )
// Image represents a loaded image that can be used in various drawing functions // Image represents a loaded image that can be used in various drawing functions

View file

@ -8,7 +8,7 @@ import (
"unsafe" "unsafe"
"github.com/tfriedel6/canvas/backend/backendbase" "github.com/tfriedel6/canvas/backend/backendbase"
"github.com/tfriedel6/canvas/backend/goglbackend/gl" "golang.org/x/mobile/gl"
) )
const alphaTexSize = 2048 const alphaTexSize = 2048