Skip to content

Commit

Permalink
Switch to the v1 gopxl releases of mainthread and glhf
Browse files Browse the repository at this point in the history
  • Loading branch information
bhperry committed Oct 9, 2023
1 parent 2b64a9e commit 2e3317f
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Here's the list of the main features in Pixel. Although Pixel is still under hea
- Platform and backend independent [core](https://godoc.org/github.com/gopxl/pixel/v2)
- Core Target/Triangles/Picture pattern makes it easy to create new drawing targets that do
arbitrarily crazy stuff (e.g. graphical effects)
- Small codebase, ~5K lines of code, including the backend [glhf](https://github.com/faiface/glhf)
- Small codebase, ~5K lines of code, including the backend [glhf](https://github.com/gopxl/glhf)
package

## Related repositories
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module github.com/gopxl/pixel/v2
go 1.21

require (
github.com/faiface/glhf v0.0.0-20211013000516-57b20770c369
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b
github.com/go-gl/mathgl v1.1.0
Expand All @@ -16,6 +14,8 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gopxl/glhf v1.0.1 // indirect
github.com/gopxl/mainthread v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/faiface/glhf v0.0.0-20211013000516-57b20770c369 h1:gv4BgP50atccdK/1tZHDyP6rMwiiutR2HPreR/OyLzI=
github.com/faiface/glhf v0.0.0-20211013000516-57b20770c369/go.mod h1:dDdUO+G9ZnJ9sc8nIUvhLkE45k8PEKW6+A3TdWsfpV0=
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3 h1:baVdMKlASEHrj19iqjARrPbaRisD7EuZEVJj6ZMLl1Q=
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3/go.mod h1:VEPNJUlxl5KdWjDvz6Q1l+rJlxF2i6xqDeGuGAxa87M=
github.com/go-gl/gl v0.0.0-20210905235341-f7a045908259/go.mod h1:wjpnOv6ONl2SuJSxqCPVaPZibGFdSci9HFocT9qtVYM=
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 h1:zDw5v7qm4yH7N8C8uWd+8Ii9rROdgWxQuGoJ9WDXxfk=
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw=
Expand All @@ -15,6 +11,10 @@ github.com/go-gl/mathgl v1.1.0 h1:0lzZ+rntPX3/oGrDzYGdowSLC2ky8Osirvf5uAwfIEA=
github.com/go-gl/mathgl v1.1.0/go.mod h1:yhpkQzEiH9yPyxDUGzkmgScbaBVlhC06qodikEM0ZwQ=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/gopxl/glhf v1.0.1 h1:LioAHyK0/WIiRFsQG5rKxn7vZaTLWzpQsythYcSywHY=
github.com/gopxl/glhf v1.0.1/go.mod h1:RjYJ8rd0+j9Q8ZCyjHkbNq6VBV3h7ClPlVEt5LtcG+s=
github.com/gopxl/mainthread v1.0.0 h1:Giw7UTkiCo1mB7dkSis8TgLtaCz9+ac4VM4Wq+qHuTw=
github.com/gopxl/mainthread v1.0.0/go.mod h1:kdgse3uN3IBQARJKuOORTf3XllmX67ukHQnj5KoOEYk=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
6 changes: 3 additions & 3 deletions pixelgl/canvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"image/color"

"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/gopxl/pixel/v2"
"github.com/go-gl/mathgl/mgl32"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/gopxl/pixel/v2"
"github.com/pkg/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions pixelgl/glframe.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pixelgl

import (
"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/gopxl/pixel/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions pixelgl/glpicture.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pixelgl
import (
"math"

"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/gopxl/pixel/v2"
)

Expand Down
8 changes: 4 additions & 4 deletions pixelgl/glshader.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package pixelgl

import (
"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/go-gl/mathgl/mgl32"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -111,8 +111,8 @@ func (gs *GLShader) getUniform(Name string) int {
//
// Example:
//
// utime := float32(time.Since(starttime)).Seconds())
// mycanvas.shader.AddUniform("u_time", &utime)
// utime := float32(time.Since(starttime)).Seconds())
// mycanvas.shader.AddUniform("u_time", &utime)
func (gs *GLShader) SetUniform(name string, value interface{}) {
t, p := getAttrType(value)
if loc := gs.getUniform(name); loc > -1 {
Expand Down
8 changes: 4 additions & 4 deletions pixelgl/gltriangles.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pixelgl
import (
"fmt"

"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/gopxl/pixel/v2"
)

Expand All @@ -26,7 +26,7 @@ var (
)

// The following is a helper so that the indices of
// each of these items is easier to see/debug.
// each of these items is easier to see/debug.
const (
triPosX = iota
triPosY
Expand Down Expand Up @@ -227,7 +227,7 @@ func (gt *GLTriangles) Copy() pixel.Triangles {
}

// index is a helper function that returns the index in the data
// slice given the i-th vertex and the item index.
// slice given the i-th vertex and the item index.
func (gt *GLTriangles) index(i, idx int) int {
return i*gt.vs.Stride() + idx
}
Expand Down
4 changes: 2 additions & 2 deletions pixelgl/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package pixelgl
import (
"time"

"github.com/faiface/mainthread"
"github.com/gopxl/pixel/v2"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/gopxl/mainthread"
"github.com/gopxl/pixel/v2"
)

// Pressed returns whether the Button is currently pressed down.
Expand Down
2 changes: 1 addition & 1 deletion pixelgl/monitor.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pixelgl

import (
"github.com/faiface/mainthread"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/gopxl/mainthread"
)

// Monitor represents a physical display attached to your computer.
Expand Down
14 changes: 7 additions & 7 deletions pixelgl/run.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pixelgl

import (
"github.com/faiface/mainthread"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/gopxl/mainthread"
"github.com/pkg/errors"
)

Expand All @@ -13,13 +13,13 @@ import (
// Call this function from the main function of your application. This is necessary, so that Run
// runs on the main thread.
//
// func run() {
// // interact with Pixel and PixelGL from here (even concurrently)
// }
// func run() {
// // interact with Pixel and PixelGL from here (even concurrently)
// }
//
// func main() {
// pixel.Run(run)
// }
// func main() {
// pixel.Run(run)
// }
//
// You can spawn any number of goroutines from your run function and interact with PixelGL
// concurrently. The only condition is that the Run function is called from your main function.
Expand Down
4 changes: 2 additions & 2 deletions pixelgl/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"image/color"
"runtime"

"github.com/faiface/glhf"
"github.com/faiface/mainthread"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/gopxl/pixel/v2"
"github.com/pkg/errors"
)
Expand Down

0 comments on commit 2e3317f

Please sign in to comment.