diff --git a/README.md b/README.md index 1706c71..5a5479d 100644 --- a/README.md +++ b/README.md @@ -144,8 +144,7 @@ If you're using Windows and having trouble building Pixel, please check [this guide](https://github.com/gopxl/pixel/v2/wiki/Building-Pixel-on-Windows) on the [wiki](https://github.com/gopxl/pixel/v2/wiki). -[PixelGL](https://godoc.org/github.com/gopxl/pixel/v2/pixelgl) backend uses OpenGL to render -graphics. Because of that, OpenGL development libraries are needed for compilation. The dependencies +OpenGL development libraries are needed for compilation. The dependencies are same as for [GLFW](https://github.com/go-gl/glfw). The OpenGL version used is **OpenGL 3.3**. diff --git a/backends/opengl/doc.go b/backends/opengl/doc.go index 06b9ed4..22003a1 100644 --- a/backends/opengl/doc.go +++ b/backends/opengl/doc.go @@ -1,4 +1,4 @@ -// Package pixelgl implements efficient OpenGL targets and utilities for the Pixel game development +// Package opengl implements efficient OpenGL targets and utilities for the Pixel game development // library, specifically Window and Canvas. // // It also contains a few additional utilities to help extend Pixel with OpenGL graphical effects. diff --git a/ext/gameloop/README.md b/ext/gameloop/README.md index 0130898..fc4c93f 100644 --- a/ext/gameloop/README.md +++ b/ext/gameloop/README.md @@ -6,7 +6,7 @@ Defines an `EasyWindow` interface with the following methods ```go type EasyWindow interface { - Win() *pixelgl.Window // get underlying GLFW window + Win() *opengl.Window // get underlying GLFW window Setup() error // setup window Update() error // update window Draw() error // draw to window @@ -38,7 +38,7 @@ window1 := MyNewWindow() // assume MyNewWindow implements EasyWindow interface window2 := MyOtherWindow() // assume MyOtherWindow implements EasyWindow interface manager := NewWindowManager() -manager.InsertWindows([]pixelgl.EasyWindow{ +manager.InsertWindows([]opengl.EasyWindow{ window1, window2, }) diff --git a/ext/gameloop/gameloop.go b/ext/gameloop/gameloop.go index 7aebd5f..49bd3e8 100644 --- a/ext/gameloop/gameloop.go +++ b/ext/gameloop/gameloop.go @@ -8,10 +8,10 @@ import ( ) type EasyWindow interface { - Win() *pixelgl.Window // get underlying GLFW window - Setup() error // setup window - Update() error // update window - Draw() error // draw to window + Win() *opengl.Window // get underlying GLFW window + Setup() error // setup window + Update() error // update window + Draw() error // draw to window } type WindowManager struct { diff --git a/tests/pixel_test.go b/tests/pixel_test.go index 2d95623..faceb67 100644 --- a/tests/pixel_test.go +++ b/tests/pixel_test.go @@ -9,7 +9,7 @@ import ( _ "image/png" "github.com/gopxl/pixel/v2" - pixelgl "github.com/gopxl/pixel/v2/backends/opengl" + "github.com/gopxl/pixel/v2/backends/opengl" ) // onePixelImage is the byte representation of a 1x1 solid white png file @@ -39,7 +39,7 @@ var onePixelImage = []byte{ } func TestMain(m *testing.M) { - pixelgl.Run(func() { + opengl.Run(func() { os.Exit(m.Run()) }) } @@ -53,13 +53,13 @@ func TestSprite_Draw(t *testing.T) { sprite := pixel.NewSprite(pic, pic.Bounds()) - cfg := pixelgl.WindowConfig{ + cfg := opengl.WindowConfig{ Title: "testing", Bounds: pixel.R(0, 0, 150, 150), Invisible: true, } - win, err := pixelgl.NewWindow(cfg) + win, err := opengl.NewWindow(cfg) if err != nil { t.Fatalf("Could not create window: %v", err) }