+
Skip to content

Update glfw to v3.3 to align with pixel #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package glhf provides abstractions around the basic OpenGL primitives and operations.
//
// All calls should be done from the main thread using "github.com/gopxl/mainthread" package.
// All calls should be done from the main thread using "github.com/gopxl/mainthread/v2" package.
//
// This package deliberately does not handle nor report trivial OpenGL errors, it's up to you to
// cause none. It does of course report errors like shader compilation error and such.
Expand Down
6 changes: 3 additions & 3 deletions examples/demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
_ "image/png"
"os"

"github.com/go-gl/glfw/v3.1/glfw"
"github.com/gopxl/glhf"
"github.com/gopxl/mainthread"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/gopxl/glhf/v2"
"github.com/gopxl/mainthread/v2"
)

func loadImage(path string) (*image.NRGBA, error) {
Expand Down
2 changes: 1 addition & 1 deletion frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package glhf
import (
"runtime"

"github.com/gopxl/mainthread"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/gopxl/mainthread/v2"
)

// Frame is a fixed resolution texture that you can draw on.
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/gopxl/glhf
module github.com/gopxl/glhf/v2

go 1.21

require (
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6
github.com/go-gl/glfw v0.0.0-20221017161538-93cebf72946b
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b
github.com/go-gl/mathgl v1.1.0
github.com/gopxl/mainthread v1.0.1-0.20231009140732-f806f4d62090
github.com/gopxl/mainthread/v2 v2.0.0-20231010001939-73dfba06ae92
github.com/pkg/errors v0.9.1
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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=
github.com/go-gl/glfw v0.0.0-20221017161538-93cebf72946b h1:2hdUMUOJuLQkhaPAwoyOeSzoaBydYEkXkBEuqDuDBfg=
github.com/go-gl/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:wyvWpaEu9B/VQiV1jsPs7Mha9I7yto/HqIBw197ZAzk=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b h1:GgabKamyOYguHqHjSkDACcgoPIz3w0Dis/zJ1wyHHHU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
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/gopxl/mainthread v1.0.1-0.20231009140732-f806f4d62090 h1:v96cHl1NrrzCjR86plhBCvf165vLmYJv6BokYPD4G+c=
github.com/gopxl/mainthread v1.0.1-0.20231009140732-f806f4d62090/go.mod h1:Zs9xkkPXz7wCVgwxksXkSvcdPJYC/KDXKJHeAD3fYn4=
github.com/gopxl/mainthread/v2 v2.0.0-20231010001939-73dfba06ae92 h1:+17VMm30TmRoIlA/S29R29A7Sqbak/6OLKjq6iX/I7U=
github.com/gopxl/mainthread/v2 v2.0.0-20231010001939-73dfba06ae92/go.mod h1:/uFQhUiSP53SSU/RQ5w0FFkljRArJlaQkDPza3zE2V8=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
Expand Down
2 changes: 1 addition & 1 deletion orphan.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package glhf
import "github.com/go-gl/gl/v3.3-core/gl"

// Init initializes OpenGL by loading function pointers from the active OpenGL context.
// This function must be manually run inside the main thread (using "github.com/gopxl/mainthread"
// This function must be manually run inside the main thread (using "github.com/gopxl/mainthread/v2"
// package).
//
// It must be called under the presence of an active OpenGL context, e.g., always after calling
Expand Down
32 changes: 17 additions & 15 deletions shader.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"runtime"

"github.com/gopxl/mainthread"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/mathgl/mgl32"
"github.com/gopxl/mainthread/v2"
)

// Shader is an OpenGL shader program.
Expand Down Expand Up @@ -141,20 +141,22 @@ func (s *Shader) UniformFormat() AttrFormat {
//
// Supplied value must correspond to the type of the attribute. Correct types are these
// (right-hand is the type of the value):
// Attr{Type: Int}: int32
// Attr{Type: Float}: float32
// Attr{Type: Vec2}: mgl32.Vec2
// Attr{Type: Vec3}: mgl32.Vec3
// Attr{Type: Vec4}: mgl32.Vec4
// Attr{Type: Mat2}: mgl32.Mat2
// Attr{Type: Mat23}: mgl32.Mat2x3
// Attr{Type: Mat24}: mgl32.Mat2x4
// Attr{Type: Mat3}: mgl32.Mat3
// Attr{Type: Mat32}: mgl32.Mat3x2
// Attr{Type: Mat34}: mgl32.Mat3x4
// Attr{Type: Mat4}: mgl32.Mat4
// Attr{Type: Mat42}: mgl32.Mat4x2
// Attr{Type: Mat43}: mgl32.Mat4x3
//
// Attr{Type: Int}: int32
// Attr{Type: Float}: float32
// Attr{Type: Vec2}: mgl32.Vec2
// Attr{Type: Vec3}: mgl32.Vec3
// Attr{Type: Vec4}: mgl32.Vec4
// Attr{Type: Mat2}: mgl32.Mat2
// Attr{Type: Mat23}: mgl32.Mat2x3
// Attr{Type: Mat24}: mgl32.Mat2x4
// Attr{Type: Mat3}: mgl32.Mat3
// Attr{Type: Mat32}: mgl32.Mat3x2
// Attr{Type: Mat34}: mgl32.Mat3x4
// Attr{Type: Mat4}: mgl32.Mat4
// Attr{Type: Mat42}: mgl32.Mat4x2
// Attr{Type: Mat43}: mgl32.Mat4x3
//
// No other types are supported.
//
// The Shader must be bound before calling this method.
Expand Down
2 changes: 1 addition & 1 deletion texture.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package glhf
import (
"runtime"

"github.com/gopxl/mainthread"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/mathgl/mgl32"
"github.com/gopxl/mainthread/v2"
)

// Texture is an OpenGL texture.
Expand Down
2 changes: 1 addition & 1 deletion vertex.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"runtime"

"github.com/gopxl/mainthread"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/gopxl/mainthread/v2"
"github.com/pkg/errors"
)

Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载