Skip to content

Commit

Permalink
completely removed all instances of pixelgl
Browse files Browse the repository at this point in the history
  • Loading branch information
duysqubix committed Oct 12, 2023
1 parent cc7841a commit 8458582
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.
Expand Down
2 changes: 1 addition & 1 deletion backends/opengl/doc.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions ext/gameloop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
})
Expand Down
8 changes: 4 additions & 4 deletions ext/gameloop/gameloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions tests/pixel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -39,7 +39,7 @@ var onePixelImage = []byte{
}

func TestMain(m *testing.M) {
pixelgl.Run(func() {
opengl.Run(func() {
os.Exit(m.Run())
})
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 8458582

Please sign in to comment.