Registry / other / go-gl-gl

go-gl-gl

JSON →
library0.0.0-20260331235117-4566fea9a276gogounverified

Go bindings for OpenGL, providing access to graphics rendering APIs.

go get github.com/go-gl/gl
INSTALL
IMPORT
SIG · GO-GL-GL
G
go-gl-gl
othergov0.0.0-20260331235117-4566fea9a276
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gl
github.com/go-gl/gl/v4.1-core/gl

Initialize OpenGL and clear the screen in a GLFW window.

package main import ( "github.com/go-gl/gl/v4.1-core/gl" "github.com/go-gl/glfw/v3.3/glfw" ) func main() { glfw.Init() window, _ := glfw.CreateWindow(800, 600, "OpenGL", nil, nil) window.MakeContextCurrent() gl.Init() gl.ClearColor(0.0, 0.0, 0.0, 1.0) for !window.ShouldClose() { gl.Clear(gl.COLOR_BUFFER_BIT) window.SwapBuffers() glfw.PollEvents() } }
Debug
Known issues
gotchaThe root package is not importable; use a specific OpenGL version subpackage like gl/v4.1-core/gl.
fix
Import github.com/go-gl/gl/v4.1-core/gl instead of github.com/go-gl/gl.
affects: all
Upgrade
Version history
0.0.0-20260331235117-4566fea9a276latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Meta
1
Resources
go-gl-gl — go get go-gl-gl · libregistry