updated ebiten version from 2.7.9 to 2.9.9
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
+8
-9
@@ -10,7 +10,6 @@ import (
|
||||
"debug/pe"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -18,7 +17,7 @@ import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var debug = log.New(ioutil.Discard, "gl: ", log.LstdFlags)
|
||||
var debug = log.New(io.Discard, "gl: ", log.LstdFlags)
|
||||
|
||||
func downloadDLLs() (path string, err error) {
|
||||
url := "https://dl.google.com/go/mobile/angle-bd3f8780b-" + runtime.GOARCH + ".tgz"
|
||||
@@ -54,11 +53,11 @@ func downloadDLLs() (path string, err error) {
|
||||
}
|
||||
switch header.Name {
|
||||
case "angle-" + runtime.GOARCH + "/libglesv2.dll":
|
||||
bytesGLESv2, err = ioutil.ReadAll(tr)
|
||||
bytesGLESv2, err = io.ReadAll(tr)
|
||||
case "angle-" + runtime.GOARCH + "/libegl.dll":
|
||||
bytesEGL, err = ioutil.ReadAll(tr)
|
||||
bytesEGL, err = io.ReadAll(tr)
|
||||
case "angle-" + runtime.GOARCH + "/d3dcompiler_47.dll":
|
||||
bytesD3DCompiler, err = ioutil.ReadAll(tr)
|
||||
bytesD3DCompiler, err = io.ReadAll(tr)
|
||||
default: // skip
|
||||
}
|
||||
if err != nil {
|
||||
@@ -70,13 +69,13 @@ func downloadDLLs() (path string, err error) {
|
||||
}
|
||||
|
||||
writeDLLs := func(path string) error {
|
||||
if err := ioutil.WriteFile(filepath.Join(path, "libglesv2.dll"), bytesGLESv2, 0755); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(path, "libglesv2.dll"), bytesGLESv2, 0755); err != nil {
|
||||
return fmt.Errorf("gl: cannot install ANGLE: %v", err)
|
||||
}
|
||||
if err := ioutil.WriteFile(filepath.Join(path, "libegl.dll"), bytesEGL, 0755); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(path, "libegl.dll"), bytesEGL, 0755); err != nil {
|
||||
return fmt.Errorf("gl: cannot install ANGLE: %v", err)
|
||||
}
|
||||
if err := ioutil.WriteFile(filepath.Join(path, "d3dcompiler_47.dll"), bytesD3DCompiler, 0755); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(path, "d3dcompiler_47.dll"), bytesD3DCompiler, 0755); err != nil {
|
||||
return fmt.Errorf("gl: cannot install ANGLE: %v", err)
|
||||
}
|
||||
return nil
|
||||
@@ -152,7 +151,7 @@ func chromePath() string {
|
||||
}
|
||||
|
||||
for _, installdir := range installdirs {
|
||||
versiondirs, err := ioutil.ReadDir(installdir)
|
||||
versiondirs, err := os.ReadDir(installdir)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -42,7 +42,7 @@ error messages. For example,
|
||||
The gldebug tracing has very high overhead, so make sure to remove
|
||||
the build tag before deploying any binaries.
|
||||
*/
|
||||
package gl // import "github.com/ebitengine/gomobile/gl"
|
||||
package gl
|
||||
|
||||
/*
|
||||
Implementation details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -81,7 +81,7 @@ type Context interface {
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glBlendFunc.xhtml
|
||||
BlendFunc(sfactor, dfactor Enum)
|
||||
|
||||
// BlendFunc sets the pixel RGB and alpha blending factors separately.
|
||||
// BlendFuncSeparate sets the pixel RGB and alpha blending factors separately.
|
||||
//
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glBlendFuncSeparate.xhtml
|
||||
BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha Enum)
|
||||
@@ -192,7 +192,7 @@ type Context interface {
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glGenTextures.xhtml
|
||||
CreateTexture() Texture
|
||||
|
||||
// CreateTVertexArray creates a vertex array.
|
||||
// CreateVertexArray creates a vertex array.
|
||||
//
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glGenVertexArrays.xhtml
|
||||
CreateVertexArray() VertexArray
|
||||
@@ -599,7 +599,7 @@ type Context interface {
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glStencilFunc.xhtml
|
||||
StencilFunc(fn Enum, ref int, mask uint32)
|
||||
|
||||
// StencilFunc sets the front or back stencil test reference value.
|
||||
// StencilFuncSeparate sets the front or back stencil test reference value.
|
||||
//
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glStencilFuncSeparate.xhtml
|
||||
StencilFuncSeparate(face, fn Enum, ref int, mask uint32)
|
||||
@@ -737,7 +737,7 @@ type Context interface {
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glUniform.xhtml
|
||||
Uniform4i(dst Uniform, v0, v1, v2, v3 int32)
|
||||
|
||||
// Uniform4i writes an ivec4 uniform array of len(src)/4 elements.
|
||||
// Uniform4iv writes an ivec4 uniform array of len(src)/4 elements.
|
||||
//
|
||||
// http://www.khronos.org/opengles/sdk/docs/man3/html/glUniform.xhtml
|
||||
Uniform4iv(dst Uniform, src []int32)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
+1
-1
@@ -160,7 +160,7 @@ func (ctx *context) cString(str string) (uintptr, func()) {
|
||||
return uintptr(ptr), func() { C.free(ptr) }
|
||||
}
|
||||
|
||||
// cString creates a pointer to a C string off the Go heap.
|
||||
// cStringPtr creates a pointer to a C string off the Go heap.
|
||||
// ret is a **char.
|
||||
func (ctx *context) cStringPtr(str string) (uintptr, func()) {
|
||||
s, free := ctx.cString(str)
|
||||
|
||||
Reference in New Issue
Block a user