Go bindings for OpenGL (generated via glow)

gl Build Status GoDoc

This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow.

Features:

  • Go functions that mirror the C specification using Go types.
  • Support for multiple OpenGL APIs (GL/GLES/EGL/WGL/GLX/EGL), versions, and profiles.
  • Support for extensions (including debug callbacks).

Requirements:

  • A cgo compiler (typically gcc).
  • On Ubuntu/Debian-based systems, the libgl1-mesa-dev package.

Usage

Use go get -u to download and install the prebuilt packages. The prebuilt packages support OpenGL versions 2.1, 3.1, 3.2, 3.3, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6 across both the core and compatibility profiles and include all extensions. Pick whichever one(s) you need:

go get -u github.com/go-gl/gl/v{3.2,3.3,4.1,4.2,4.3,4.4,4.5,4.6}-{core,compatibility}/gl
go get -u github.com/go-gl/gl/v3.1/gles2
go get -u github.com/go-gl/gl/v2.1/gl

Once the bindings are installed you can use them with the appropriate import statements.

import "github.com/go-gl/gl/v3.3-core/gl"

func main() {
	window := ... // Open a window.
	window.MakeContextCurrent()

	// Important! Call gl.Init only under the presence of an active OpenGL context,
	// i.e., after MakeContextCurrent.
	if err := gl.Init(); err != nil {
		log.Fatalln(err)
	}
}

The gl package contains the OpenGL functions and enumeration values for the imported version. It also contains helper functions for working with the API. Of note is gl.Ptr which takes a Go array or slice or pointer and returns a corresponding uintptr to use with functions expecting data pointers. Also of note is gl.Str which takes a null-terminated Go string and returns a corresponding *int8 to use with functions expecting character pointers.

A note about threading and goroutines. The bindings do not expose a mechanism to make an OpenGL context current on a different thread so you must restrict your usage to the thread on which you called gl.Init(). To do so you should use LockOSThread.

Examples

Examples illustrating how to use the bindings are available in the example repo. There are examples for OpenGL 4.1 core and OpenGL 2.1.

Function Loading

The procaddr package contains platform-specific functions for loading OpenGL functions. Calling gl.Init() uses the auto subpackage to automatically select an appropriate implementation based on the build environment. If you want to select a specific implementation you can use the noauto build tag and the gl.InitWithProcAddrFunc initialization function.

Generating

These gl bindings are generated using the Glow generator. Only developers of this repository need to do this step.

It is required to have glow source in the same Go workspace (since relative paths are used) and the glow binary should be in your $PATH. Doable with go get -u github.com/go-gl/glow if your $GOPATH/bin is in your $PATH.

go generate -tags=gen github.com/go-gl/gl

More information about these bindings can be found in the Glow repository.

Owner
OpenGL with Golang
OpenGL with Golang
Comments
  • gl.FenceSync returns invalid unsafe.Pointer, causing crash

    gl.FenceSync returns invalid unsafe.Pointer, causing crash

    gl.FenceSync returns the created fence as an unsafe.Pointer. However, values returned by glFenceSync aren't necessarily valid pointers to memory owned by the driver.

    On my system (nvidia 378.13 on Linux), for example, glFenceSync returns increasing numbers, starting at 1. The issue with that is that the Go runtime expects pointers in unsafe.Pointer to be valid, either pointing to memory owned by the Go memory allocator, or valid, non-Go memory. Pointers such as "1" are neither, which causes runtime.writebarrierptr to abort the program with a "bad pointer in write barrier" error. Similarly, the driver might return a value that looks like a valid pointer to Go memory, preventing said Go memory from being garbage collected as long as the unsafe.Pointer is alive.

    To simulate the issue, compile https://play.golang.org/p/614oIx_Y1D and run it with GOGC=0 (to force frequent GCs, triggering the problem faster.). You should see the following:

    $ GOGC=0 ./foo
    runtime: writebarrierptr *0x4fa230 = 0x1
    fatal error: bad pointer in write barrier
    
    runtime stack:
    runtime.throw(0x4a81ca, 0x1c)
    	/usr/lib/go/src/runtime/panic.go:596 +0x95
    runtime.writebarrierptr.func1()
    	/usr/lib/go/src/runtime/mbarrier.go:208 +0xbd
    runtime.systemstack(0x4fab00)
    	/usr/lib/go/src/runtime/asm_amd64.s:327 +0x79
    runtime.mstart()
    	/usr/lib/go/src/runtime/proc.go:1132
    
    goroutine 1 [running]:
    runtime.systemstack_switch()
    	/usr/lib/go/src/runtime/asm_amd64.s:281 fp=0xc420048f00 sp=0xc420048ef8
    runtime.writebarrierptr(0x4fa230, 0x1)
    	/usr/lib/go/src/runtime/mbarrier.go:209 +0x96 fp=0xc420048f38 sp=0xc420048f00
    main.main()
    	/tmp/foo.go:15 +0x9b fp=0xc420048f88 sp=0xc420048f38
    runtime.main()
    	/usr/lib/go/src/runtime/proc.go:185 +0x20a fp=0xc420048fe0 sp=0xc420048f88
    runtime.goexit()
    	/usr/lib/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420048fe8 sp=0xc420048fe0
    

    I would recommend returning a uintptr instead (and, similarly, accepting a uintptr in gl.ClientWaitSync and gl.WaitSync).

  • Vulkan ?

    Vulkan ?

    Nvidea has released drivers. And the open source Intel drivers are almost named.

    No spi yet. Also I saw the golang/mobile team are thinking about vulkan.

    So what do you think ? Kind of itching this get going in Vulcan.

  • gl.DebugMessageCallback crash on OS X 10.11

    gl.DebugMessageCallback crash on OS X 10.11

    As thoroughly documented in gdm85/wolfengo#1, the function gl.DebugMessageCallback cannot be used on Mac OS X 10.11 and causes always a crash with SIGSEGV.

    I have no idea why this is happening, although it could be related to the call to GoStr(message) in there.

    Alternatively, it could be possible that the memory access is denied because of a thread mismatch issue? e.g. the Go debug function is not locked on the same thread as the GL thread, but I doubt about this.

  • v3.1/gles2: installing GLES2 shows

    v3.1/gles2: installing GLES2 shows "fatal error: KHR/khrplatform.h: No such file or directory"

    Tried to download & install GLES2 with go get -u github.com/go-gl/gl/v3.1/gles2. Git the following error: fatal error: KHR/khrplatform.h: No such file or directory.

    Im using GO 1.14.2 with MinGW GCC 8.1.0. All correctly installed.

    The file "khrplatform.h" does simply not exist within the include directories of GCC.

  • Strs should be able to handle non-null-terminated strings

    Strs should be able to handle non-null-terminated strings

    Strs will panic when a string without a null terminator is found. However, it should be easy to handle this case, and add a null terminator if one is not present. This saves having to muck with the strings passed in before, and doesn't break compatibility.

    I'll happily do this, if there's an interest in this.

  • gl.ReadPixels unexpected signal

    gl.ReadPixels unexpected signal

    I am trying to use gl.ReadPixels (for version 2.1) and no matter how I do it, the program receives fatal error: unexpected signal during runtime execution [signal 0xb code=0x1 addr=0x0 pc=0x7fff8f75dbbd]

    Here is my simplified code

        w, h := int32(1), int32(1)
        screenshot := image.NewRGBA(image.Rect(0, 0, int(w), int(h)))
        pix := make([]byte, len(screenshot.Pix))
        gl.ReadPixels(0, 0, w, h, gl.RGBA, gl.UNSIGNED_BYTE, gl.Ptr(pix))
    

    go version go1.5.1 darwin/amd64 git rev: 7c718d1758f0e23896e295ff50bb34c2c5fe901d

  • proposal: Remove 'C' types from the exposed APIs

    proposal: Remove 'C' types from the exposed APIs

    Now gl packages has APIs that expose C types:

    func BufferStorageExternalEXT(target uint32, offset int, size int, clientBuffer C.GLeglClientBufferEXT, flags uint32) {}
    func CreateSyncFromCLeventARB(context *C.struct__cl_context, event *C.struct__cl_event, flags uint32) uintptr {}
    func DebugMessageCallbackAMD(callback C.GLDEBUGPROCAMD, userParam unsafe.Pointer) {}
    func EGLImageTargetRenderbufferStorageOES(target uint32, image C.GLeglImageOES) {}
    func EGLImageTargetTexStorageEXT(target uint32, image C.GLeglImageOES, attrib_list *int32) {}
    func EGLImageTargetTexture2DOES(target uint32, image C.GLeglImageOES) {}
    func EGLImageTargetTextureStorageEXT(texture uint32, image C.GLeglImageOES, attrib_list *int32) {}
    func GetVkProcAddrNV(name *uint8) C.GLVULKANPROCNV {}
    func NamedBufferStorageExternalEXT(buffer uint32, offset int, size int, clientBuffer C.GLeglClientBufferEXT, flags uint32) {}
    

    The problem is that this violates the guideline of Cgo: https://golang.org/cmd/cgo/ says that "a Go package should not expose C types in its exported API". Furthermore, #109 (remove Cgo dependencies on Windows) is now impossible due to these APIs.

    I propose to replace such C types with unsafe.Pointer:

    • C.GLeglClientBufferEXT is equivalent to void*: https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_external_buffer.txt
    • *C.struct__cl_context is a pointer
    • *C.struct__cl_event is a pointer
    • C.GLDEBUGPROCAMD is a function pointer: https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_debug_output.txt
    • C.GLeglImageOES is equiavalent to void*: https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt
    • C.GLVULKANPROCNV is a function pointer: (could not find a source but some implementation says it is a pointer).

    This proposal breaks the backward compability since this changes the exposed APIs, but I think the risk is low. GitHub code search says there is no actual usage of these functions:

    It's possible to do further investigation with sourcegraph.com, but this is harder since this needs to specified GL versions.

    What do you think? Thanks!

    CC @dmitshur

  • GOARCH=arm support.

    GOARCH=arm support.

    I am getting below error, after downloading (go get -u github.com/go-gl/gl/v{3.2,3.3,4.1,4.2,4.3,4.4,4.5}-{core,compatibility}/gl)

    # github.com/go-gl/gl/v3.2-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v3.3-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v3.2-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.1-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v3.3-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.1-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.2-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.3-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.2-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.4-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.3-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.5-core/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.4-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    # github.com/go-gl/gl/v4.5-compatibility/gl
    arm-linux-gnueabi-gcc: error: unrecognized command line option '-m64'
    

    My development machine is Ubuntu 16.04 amd64 and target is arm. Please advise to solve this issue

  • `go get` fails on FreeBSD

    `go get` fails on FreeBSD

    The Go version is 1.8.

    $ go get -u -x github.com/go-gl/gl/v2.1/...
    cd /home/hajimehoshi/go/src/github.com/go-gl/gl
    git config remote.origin.url
    cd /home/hajimehoshi/go/src/github.com/go-gl/gl
    git pull --ff-only
    cd /home/hajimehoshi/go/src/github.com/go-gl/gl
    git submodule update --init --recursive
    cd /home/hajimehoshi/go/src/github.com/go-gl/gl
    git show-ref
    cd /home/hajimehoshi/go/src/github.com/go-gl/gl
    git submodule update --init --recursive
    WORK=/tmp/go-build425271991
    mkdir -p $WORK/github.com/go-gl/gl/v2.1/gl/_obj/
    mkdir -p $WORK/github.com/go-gl/gl/v2.1/
    cd /home/hajimehoshi/go/src/github.com/go-gl/gl/v2.1/gl
    CGO_LDFLAGS="-g" "-O2" /usr/local/go/pkg/tool/freebsd_amd64/cgo -objdir $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -importpath github.com/go-gl/gl/v2.1/gl -- -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 conversions.go debug.go package.go procaddr.go
    # github.com/go-gl/gl/v2.1/gl
    could not determine kind of name for C.GlowGetProcAddress
    could not determine kind of name for C.free
    
  • blank screen when it should be a triangle

    blank screen when it should be a triangle

    Hello!

    Im trying to grasp the restructuring of your go-gl library. But I'm having problems drawing a simple triangle with the new opengl4 bindings.

    Maybe I'm doing something wrong, but it could also be a bug, any help would be appreciated!

    The code:

    package main
    
    import (
        "fmt"
        "runtime"
    
        gl "github.com/go-gl/gl/v4.1-core/gl"
        glfw "github.com/go-gl/glfw/v3.1/glfw"
    )
    
    var points = []float32{
        0.0, 0.5, 0.0,
        0.5, -0.5, 0.0,
        -0.5, -0.5, 0.0,
    }
    
    var vertexShader = `
    #version 410
    
    in vec3 vp;
    void main() {
    gl_Position = vec4(vp, 1.0);
    }
    ` + "\x00"
    
    var fragmentShader = `
    #version 410
    
    out vec4 frag_colour;
    void main() {
    frag_colour = vec4(0.5, 0.0, 0.5, 1.0);
    }
    ` + "\x00"
    
    func main() {
        runtime.LockOSThread()
    
        if err := glfw.Init(); err != nil {
            panic(err)
        }
    
        glfw.WindowHint(glfw.ContextVersionMajor, 4)
        glfw.WindowHint(glfw.ContextVersionMinor, 1)
        glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True)    // Necessary for OS X
        glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile) // Necessary for OS X
        glfw.WindowHint(glfw.OpenGLDebugContext, glfw.True)
    
        glfw.WindowHint(glfw.Resizable, glfw.True)
    
        win, err := glfw.CreateWindow(800, 600, "Tutorial #1", nil, nil)
    
        if err != nil {
            panic(err)
        }
    
        if err := gl.Init(); err != nil {
            panic(err)
        }
    
        win.MakeContextCurrent()
        gl.ClearColor(1.0, 1.0, 1.0, 1.0)
    
        gl.Enable(gl.DEPTH_TEST)
        gl.DepthFunc(gl.LESS)
    
        fmt.Printf("%s\n", gl.GoStr(gl.GetString(gl.RENDERER)))
        fmt.Printf("%s\n", gl.GoStr(gl.GetString(gl.VERSION)))
    
        var vbo uint32
        gl.GenBuffers(1, &vbo)
        gl.BindBuffer(gl.ARRAY_BUFFER, vbo)
        gl.BufferData(gl.ARRAY_BUFFER, len(points)*4, gl.Ptr(&points), gl.STATIC_DRAW)
    
        var vao uint32
        gl.GenVertexArrays(1, &vao)
        gl.BindVertexArray(vao)
        gl.EnableVertexAttribArray(0)
        gl.BindBuffer(gl.ARRAY_BUFFER, vbo)
        gl.VertexAttribPointer(0, 3, gl.FLOAT, false, 0, nil)
        gl.Viewport(0, 0, 800, 600)
    
        shader := createProgram()
    
        for !win.ShouldClose() {
            gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
    
            gl.UseProgram(shader)
            gl.BindVertexArray(vao)
            gl.DrawArrays(gl.TRIANGLES, 0, 3)
    
            glfw.PollEvents()
            win.SwapBuffers()
        }
    }
    
    func createProgram() uint32 {
        vs := gl.CreateShader(gl.VERTEX_SHADER)
        cvertexShader := gl.Str(vertexShader)
        gl.ShaderSource(vs, 1, &cvertexShader, nil)
        gl.CompileShader(vs)
    
        fs := gl.CreateShader(gl.FRAGMENT_SHADER)
        cfragmentShader := gl.Str(fragmentShader)
        gl.ShaderSource(fs, 1, &cfragmentShader, nil)
        gl.CompileShader(fs)
    
        shaderProgram := gl.CreateProgram()
        gl.AttachShader(shaderProgram, fs)
        gl.AttachShader(shaderProgram, vs)
    
        gl.LinkProgram(shaderProgram)
    
        return shaderProgram
    }
    
  • go get fails on FreeBSD CURRENT

    go get fails on FreeBSD CURRENT

    I have read through #74 but I can't see anything I am doing wrong.

    % go get -u github.com/go-gl/gl/v3.2-core/gl
    # github.com/go-gl/gl/v3.2-core/gl
    ./procaddr.go:52:11: fatal error: 'GL/glx.h' file not found
            #include <GL/glx.h>
                     ^~~~~~~~~~
    1 error generated.
    

    I have tried adding "-I/usr/local/inlcude" to the cgo tag - but the same error occurs.

    glx.h exists here: /usr/local/include/GL/glx.h

    I am trying to get https://github.com/golang-ui/nuklear installed and this is a dependency.

    I am using FreeBSD CURRENT on AMD64.

  • could not import C (cgo preprocessing failed) (compile) when running staticcheck

    could not import C (cgo preprocessing failed) (compile) when running staticcheck

    I have the following error when running staticcheck on my app in a golang:1.19-buster docker container. I also installedlibgl1-mesa-dev but it didn't help:

    staticcheck ./...
    #21 82.97 /go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/build.go:53:8: could not import C (cgo preprocessing failed) (compile)
    
  • Init doesnt load glActiveTexture

    Init doesnt load glActiveTexture

    Hello

    I'm trying to run a project on windows 10 but when I get to gl.Init() internally InitWithProcAddrFunc fails on the line where:

    	gpActiveTexture = (C.GPACTIVETEXTURE)(getProcAddr("glActiveTexture"))
    	if gpActiveTexture == nil {
    		return errors.New("glActiveTexture")
    	}
    

    I have 4.6 opengl drivers and am using Intel(R) UHD Graphics 630 card. Any ideas why this could be occuring, Thanks!

  • gl.BufferSubData()  crashed

    gl.BufferSubData() crashed

    Hi,

    I'm using the gl.BufferSubDate() to refresh an array uniform block for shaders. It's ok on Ubuntu but cashes on Windows everytime. Environment of gl is msys2(mingw64) on windows11, gpu is the AMD-6800 igpu.

    Each time it can last seconds whlie everything looks good, and then it crashed with following message:

    Exception 0xc0000005 0x0 0xc0002640e0 0x7ffeac1f3f90
    PC=0x7ffeac1f3f90
    signal arrived during external code execution
    
    runtime.cgocall(0x7ff7097215f0, 0xc0007c9b80)
            D:/Program Files/Go/src/runtime/cgocall.go:157 +0x4a fp=0xc0007c9b58 sp=0xc0007c9b20 pc=0x7ff7095b436a
    github.com/go-gl/gl/v4.6-compatibility/gl._Cfunc_glowBufferSubData(0x7ffead208740, 0x8a11, 0x0, 0x140, 0xc000263fc0)
            _cgo_gotypes.go:8606 +0x52 fp=0xc0007c9b80 sp=0xc0007c9b58 pc=0x7ff70966f952
    github.com/go-gl/gl/v4.6-compatibility/gl.BufferSubData.func1(0x97a2a80?, 0xc0007b24c8?, 0x7ff7097a9260?, 0xc0007c9c01?)
            C:/Users/t1/go/pkg/mod/github.com/go-gl/[email protected]/v4.6-compatibility/gl/package.go:20701 +0x7e fp=0xc0007c9be0 sp=0xc0007c9b80 pc=0x7ff70967585e
    github.com/go-gl/gl/v4.6-compatibility/gl.BufferSubData(0x97a2a80?, 0xc0007b24c8?, 0x10?, 0xc00015c120?)
            C:/Users/t1/go/pkg/mod/github.com/go-gl/[email protected]/v4.6-compatibility/gl/package.go:20701 +0x19 fp=0xc0007c9c10 sp=0xc0007c9be0 pc=0x7ff709675799
    

    I am using gl.DebugMessageCallback() for debug messages but nothing captured before crashing.

    Looking forward to your reply, thx!

  • bad access: nil dereference GenBuffers()

    bad access: nil dereference GenBuffers()

    Hello I'm having issues generating an vertex buffer.

    I have a very simple Shader struct as so

    type Shader struct { vbo uint32 }

    which I try to use in a generate in a separate function as so:

    func NewShader() *Shader { sh := &Shader{vbo: 0} gl.GenBuffers(1, &sh.vbo) gl.BindBuffer(gl.ARRAY_BUFFER, sh.vbo) gl.BufferData(gl.ARRAY_BUFFER, len(vertices)*4, gl.Ptr(vertices), gl.STATIC_DRAW) return sh }

    however I get a panic bad access: nil dereference.

    I initialize the OpenGL binding in a separate init() function.

    Any help would be greatly appreciated.

  • Which version of GLES is supported?

    Which version of GLES is supported?

  • build report error in ubuntu20.04

    build report error in ubuntu20.04

    Hi, I am using your gl package and it works very well for most case. But when I try to build the program as a stand alone executable by command go build -x -v --ldflags -extldflags=-static, the go builder report error on ubuntu20.04:

    /usr/bin/ld: cannot find -lGL
    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    

    I checked all possible paths and linked the libGL everywhere but still got same error. Would you please advise how to fix this or what may cause this issues of your gl package?

Related tags
Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Aug 18, 2018
Go cross-platform OpenGL bindings.

gl Package gl is a Go cross-platform binding for OpenGL, with an OpenGL ES 2-like API. It supports: macOS, Linux and Windows via OpenGL 2.1 backend, i

Nov 21, 2022
golang OpenGL helper functions

glh: golang OpenGL helpers This package contains a number of functions useful for applications using OpenGL. Code Reference Features Textures and Text

Apr 8, 2022
OpenGL binding generator for Go

GoGL GoGL is an OpenGL binding generator for Go. No external dependencies like GLEW are needed. Install the OpenGL bindings For example, OpenGL 2.1 bi

Dec 25, 2022
Go cross-platform glfw library for creating an OpenGL context and receiving events.

glfw Package glfw experimentally provides a glfw-like API with desktop (via glfw) and browser (via HTML5 canvas) backends. It is used for creating a G

Sep 27, 2022
Quake 2 Level Renderer written in Go and OpenGL
Quake 2 Level Renderer written in Go and OpenGL

go-quake2 Quake 2 Map Renderer written in Go and OpenGL. Features Loads any BSP file from Quake 2 Free roam around the environment Renders only a smal

Jan 4, 2023
Canvas is a Go drawing library based on OpenGL or using software rendering that is very similar to the HTML5 canvas API
Canvas is a Go drawing library based on OpenGL or using software rendering that is very similar to the HTML5 canvas API

Go canvas Canvas is a pure Go library that provides drawing functionality as similar as possible to the HTML5 canvas API. It has nothing to do with HT

Jan 3, 2023
A Pong clone made from scratch with Go and C using OpenGL 3.3

Go-Pong A Pong video game clone made with Go lang and OpenGL 3.3 using C. Gameplay Offline Key bindings are 'w' and 's' for the left player and 'up ar

Feb 10, 2022
OpenGL renderer

oglr About oglr is a package for Go to load OpenGL functions and render graphics. It is published on https://github.com/vbsw/oglr. Copyright Copyright

Jun 21, 2022
Convert images to computer generated art using delaunay triangulation.
Convert images to computer generated art using delaunay triangulation.

▲ Triangle is a tool for generating triangulated image using delaunay triangulation. It takes a source image and converts it to an abstract image comp

Dec 29, 2022
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Jan 8, 2023
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Dec 25, 2022
Go bindings for audio capture and playback with ALSA and libasound

Go ALSA bindings These bindings allow capture and playback of audio via ALSA using the alsa-lib library. Installation go get github.com/cocoonlife/goa

Nov 26, 2022
naive go bindings to GnuPlot
naive go bindings to GnuPlot

go-gnuplot Simple-minded functions to work with gnuplot. go-gnuplot runs gnuplot as a subprocess and pushes commands via the STDIN of that subprocess.

Nov 8, 2021
go-gtk3 - GTK3 BINDINGS FOR GO

go-gtk3 - GTK3 BINDINGS FOR GO THIS IS: Hopefully GTK3 Bindings using gobject binding for Go. Goal is to have fairly complete gtk3 widgets with pango

May 25, 2021
Experimental OpenAL bindings for Go.

Experimental OpenAL bindings for Go. ==================================== Everything is evolving quickly and nothing is totally done. If you want to

Jul 24, 2022
Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv

Go OpenCV binding A Golang binding for OpenCV. OpenCV 1.x C API bindings through CGO, and OpenCV 2+ C++ API (GoCV) through SWIG. Disclaimer This is a

Dec 21, 2022
Go bindings for GStreamer (retired: currently I don't use/develop this package)

Retired. I don't use/develop this package anymore. Go bindings for GStreamer at a very early stage of maturity. This package is based on GLib bindings

Nov 10, 2022
Go bindings for libVLC and high-level media player interface
Go bindings for libVLC and high-level media player interface

Go bindings for libVLC 2.X/3.X/4.X and high-level media player interface. The package can be useful for adding multimedia capabilities to applications

Dec 31, 2022