fixed xmobile backend
This commit is contained in:
parent
505386f199
commit
c945678725
7 changed files with 7 additions and 7 deletions
|
@ -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() {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue