Skip to content
Open
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Features:
Requirements:
- A cgo compiler (typically gcc).
- On Ubuntu/Debian-based systems, the `libgl1-mesa-dev` package.
- On Fedora/RHEL-based systems, the `libXxf86vm-devel` and `mesa-libGL-devel` packages.

## Usage

Expand All @@ -27,6 +28,11 @@ package main
import "github.com/go-gl/gl/v3.3-core/gl"

func main() {
if err := glfw.Init(); err != nil {
log.Fatalln("failed to initialize glfw:", err)
}
defer glfw.Terminate()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not include this. It wouldn't compile anyway because it doesn't have a "glfw" import, and the window opening code is still "...". This example isn't meant to be complete code; we have https://github.com/go-gl/example for that. In theory this package can be used with something other than glfw, too.


window := ... // Open a window.
window.MakeContextCurrent()

Expand Down