diff --git a/README.md b/README.md index 56ed36b..a3821f7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/go.mod b/go.mod index 6b4403f..1507651 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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 ) diff --git a/go.sum b/go.sum index 44ed4ba..aa9d088 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= diff --git a/pixelgl/canvas.go b/pixelgl/canvas.go index 47c2f65..3735d93 100644 --- a/pixelgl/canvas.go +++ b/pixelgl/canvas.go @@ -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" ) diff --git a/pixelgl/glframe.go b/pixelgl/glframe.go index 6691996..04d929d 100644 --- a/pixelgl/glframe.go +++ b/pixelgl/glframe.go @@ -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" ) diff --git a/pixelgl/glpicture.go b/pixelgl/glpicture.go index c2f5f38..46a8aa9 100644 --- a/pixelgl/glpicture.go +++ b/pixelgl/glpicture.go @@ -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" ) diff --git a/pixelgl/glshader.go b/pixelgl/glshader.go index f0f2207..098177e 100644 --- a/pixelgl/glshader.go +++ b/pixelgl/glshader.go @@ -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" ) @@ -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 { diff --git a/pixelgl/gltriangles.go b/pixelgl/gltriangles.go index 87dbb2b..e669654 100644 --- a/pixelgl/gltriangles.go +++ b/pixelgl/gltriangles.go @@ -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" ) @@ -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 @@ -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 } diff --git a/pixelgl/input.go b/pixelgl/input.go index 2ef646f..a0147ae 100644 --- a/pixelgl/input.go +++ b/pixelgl/input.go @@ -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. diff --git a/pixelgl/monitor.go b/pixelgl/monitor.go index 1d6077a..38c9c83 100644 --- a/pixelgl/monitor.go +++ b/pixelgl/monitor.go @@ -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. diff --git a/pixelgl/run.go b/pixelgl/run.go index c2822fb..4803d11 100644 --- a/pixelgl/run.go +++ b/pixelgl/run.go @@ -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" ) @@ -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. diff --git a/pixelgl/window.go b/pixelgl/window.go index 6e62b8a..ca5123b 100644 --- a/pixelgl/window.go +++ b/pixelgl/window.go @@ -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" )