SDL2 binding for Go

Overview

SDL2 binding for Go Build Status Go Report Card Reviewed by Hound Financial Contributors on Open Collective

go-sdl2 is SDL2 wrapped for Go users. It enables interoperability between Go and the SDL2 library which is written in C. That means the original SDL2 installation is required for this to work.

Table of Contents

Documentation

Examples

package main

import "github.com/veandco/go-sdl2/sdl"

func main() {
	if err := sdl.Init(sdl.INIT_EVERYTHING); err != nil {
		panic(err)
	}
	defer sdl.Quit()

	window, err := sdl.CreateWindow("test", sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED,
		800, 600, sdl.WINDOW_SHOWN)
	if err != nil {
		panic(err)
	}
	defer window.Destroy()

	surface, err := window.GetSurface()
	if err != nil {
		panic(err)
	}
	surface.FillRect(nil, 0)

	rect := sdl.Rect{0, 0, 200, 200}
	surface.FillRect(&rect, 0xffff0000)
	window.UpdateSurface()

	running := true
	for running {
		for event := sdl.PollEvent(); event != nil; event = sdl.PollEvent() {
			switch event.(type) {
			case *sdl.QuitEvent:
				println("Quit")
				running = false
				break
			}
		}
	}
}

For more complete examples, see https://github.com/veandco/go-sdl2-examples. You can run any of the .go files with go run.

Requirements

Below is some commands that can be used to install the required packages in some Linux distributions. Some older versions of the distributions such as Ubuntu 13.10 may also be used but it may miss an optional package such as libsdl2-ttf-dev on Ubuntu 13.10's case which is available in Ubuntu 14.04.

On Ubuntu 14.04 and above, type:
apt install libsdl2{,-image,-mixer,-ttf,-gfx}-dev

On Fedora 25 and above, type:
yum install SDL2{,_image,_mixer,_ttf,_gfx}-devel

On Arch Linux, type:
pacman -S sdl2{,_image,_mixer,_ttf,_gfx}

On Gentoo, type:
emerge -av libsdl2 sdl2-{image,mixer,ttf,gfx}

On macOS, install SDL2 via Homebrew like so:
brew install sdl2{,_image,_mixer,_ttf,_gfx} pkg-config

On Windows,

  1. Install mingw-w64 from Mingw-builds
    • Version: latest (at time of writing 6.3.0)
    • Architecture: x86_64
    • Threads: win32
    • Exception: seh
    • Build revision: 1
    • Destination Folder: Select a folder that your Windows user owns
  2. Install SDL2 http://libsdl.org/download-2.0.php
    • Extract the SDL2 folder from the archive using a tool like 7zip
    • Inside the folder, copy the i686-w64-mingw32 and/or x86_64-w64-mingw32 depending on the architecture you chose into your mingw-w64 folder e.g. C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64
  3. Setup Path environment variable
    • Put your mingw-w64 binaries location into your system Path environment variable. e.g. C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\bin and C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\bin
  4. Open up a terminal such as Git Bash and run go get -v github.com/veandco/go-sdl2/sdl.
  5. (Optional) You can repeat Step 2 for SDL_image, SDL_mixer, SDL_ttf
    • NOTE: pre-build the libraries for faster compilation by running go install github.com/veandco/go-sdl2/{sdl,img,mix,ttf}
  • Or you can install SDL2 via Msys2 like so: pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2{,_image,_mixer,_ttf,_gfx}

Installation

To get the bindings, type:
go get -v github.com/veandco/go-sdl2/sdl
go get -v github.com/veandco/go-sdl2/img
go get -v github.com/veandco/go-sdl2/mix
go get -v github.com/veandco/go-sdl2/ttf
go get -v github.com/veandco/go-sdl2/gfx

or type this if you use Bash terminal:
go get -v github.com/veandco/go-sdl2/{sdl,img,mix,ttf}

Due to go-sdl2 being under active development, a lot of breaking changes are going to happen during v0.x. With versioning system coming to Go soon, we'll make use of semantic versioning to ensure stability in the future.

Static compilation

Since v0.3.0, it is possible to build statically against included libraries in .go-sdl2-libs. To build statically, run:

CGO_ENABLED=1 CC=gcc GOOS=linux GOARCH=amd64 go build -tags static -ldflags "-s -w"

You can also cross-compile to another OS. For example, to Windows:

CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w"

For the list of OS and architecture, you can see inside the .go-sdl2-libs directory.

NOTE: If you're using the new Go Module system, you will need to refer to the master branch for now by running:

go get -v github.com/veandco/go-sdl2/[email protected]

Before building the program.

Cross-compiling

Linux to Windows

  1. Install MinGW toolchain.
    • On Arch Linux, it's simply pacman -S mingw-w64.
  2. Download the SDL2 development package for MinGW here (and the others like SDL_image, SDL_mixer, etc.. here if you use them).
  3. Extract the SDL2 development package and copy the x86_64-w64-mingw32 folder inside recursively to the system's MinGW x86_64-w64-mingw32 folder. You may also do the same for the i686-w64-mingw32 folder.
    • On Arch Linux, it's cp -r x86_64-w64-mingw32 /usr.
  4. Now you can start cross-compiling your Go program by running env CGO_ENABLED="1" CC="/usr/bin/x86_64-w64-mingw32-gcc" GOOS="windows" CGO_LDFLAGS="-lmingw32 -lSDL2" CGO_CFLAGS="-D_REENTRANT" go build -x main.go. You can change some of the parameters if you'd like to. In this example, it should produce a main.exe executable file.
  5. Before running the program, you need to put SDL2.dll from the SDL2 runtime package (For others like SDL_image, SDL_mixer, etc.., look for them here) for Windows in the same folder as your executable.
  6. Now you should be able to run the program using Wine or Windows!

macOS to Windows

  1. Install Homebrew
  2. Install MinGW through Homebrew via brew install mingw-w64
  3. Download the SDL2 development package for MinGW here (and the others like SDL_image, SDL_mixer, etc.. here if you use them).
  4. Extract the SDL2 development package and copy the x86_64-w64-mingw folder inside recursively to the system's MinGW x86_64-w64-mingw32 folder. You may also do the same for the i686-w64-mingw32 folder. The path to MinGW may be slightly different but the command should look something like cp -r x86_64-w64-mingw32 /usr/local/Cellar/mingw-w64/5.0.3/toolchain-x86_64.
  5. Now you can start cross-compiling your Go program by running env CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows CGO_LDFLAGS="-L/usr/local/Cellar/mingw-w64/5.0.3/toolchain-x86_64/x86_64-w64-mingw32/lib -lSDL2" CGO_CFLAGS="-I/usr/local/Cellar/mingw-w64/5.0.3/toolchain-x86_64/x86_64-w64-mingw32/include -D_REENTRANT" go build -x main.go. You can change some of the parameters if you'd like to. In this example, it should produce a main.exe executable file.
  6. Before running the program, you need to put SDL2.dll from the SDL2 runtime package (For others like SDL_image, SDL_mixer, etc.., look for them here) for Windows in the same folder as your executable.
  7. Now you should be able to run the program using Wine or Windows!

Linux to macOS

  1. Install macOS toolchain via osxcross
  2. Run the following build command (replace the values in parentheses):
CGO_ENABLED=1 CC=[path-to-osxcross]/target/bin/[arch]-apple-darwin[version]-clang GOOS=darwin GOARCH=[arch] go build -tags static -ldflags "-s -w" -a

FAQ

Why does the program not run on Windows? Try putting the runtime libraries (e.g. SDL2.dll and friends) in the same folder as your program.

Why does my program crash randomly or hang? Putting runtime.LockOSThread() at the start of your main() usually solves the problem (see SDL2 FAQ about multi-threading).

UPDATE: Recent update added a call queue system where you can put thread-sensitive code and have it called synchronously on the same OS thread. See the render_queue or render_goroutines examples from https://github.com/veandco/go-sdl2-examples to see how it works.

Why can't SDL_mixer seem to play MP3 audio file? Your installed SDL_mixer probably doesn't support MP3 file.

On macOS, this is easy to correct. First remove the faulty mixer: brew remove sdl2_mixer, then reinstall it with the MP3 option: brew install sdl2_mixer --with-flac --with-fluid-synth --with-libmikmod --with-libmodplug --with-smpeg2. If necessary, check which options you can enable with brew info sdl2_mixer. You could also try installing sdl2_mixer with mpg123 by running brew install sdl2_mixer --with-mpg123.

On Other Operating Systems, you will need to compile smpeg and SDL_mixer from source with the MP3 option enabled. You can find smpeg in the external directory of SDL_mixer. Refer to issue #148 for instructions.

Note that there seems to be a problem with SDL_mixer 2.0.2 so you can also try to revert back to 2.0.1 and see if it solves your problem

Does go-sdl2 support compiling on mobile platforms like Android and iOS? For Android, see https://github.com/veandco/go-sdl2-examples/tree/master/examples/android.

There is currently no support for iOS yet.

Why does my window not immediately render after creation? It appears the rendering subsystem needs some time to be able to present the drawn pixels. This can be workaround by adding delay using sdl.Delay() or put the rendering code inside a draw loop.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

Go-SDL2 is BSD 3-clause licensed.

Comments
  • Generate a standalone build on Mac OS X

    Generate a standalone build on Mac OS X

    How do you generate a build shipping with statically linked version of the libs (the goal being to be able to distribute a binary to people without asking them to install sdl2 and other shared libs via homebrew or apt-get) ?

    I tried multiple things - nothing works. The closest I got is on topheman/gopher-ball, running CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o gopher-ball-darwin-amd64.app ., I got the following error:

    # github.com/veandco/go-sdl2/sdl
    ../../veandco/go-sdl2/sdl/yuv_sw_c.go:17: undefined: Surface
    ../../veandco/go-sdl2/sdl/yuv_sw_c.go:18: undefined: Surface
    make: *** [darwin] Error 2
    

    More infos https://github.com/topheman/gopher-ball/issues/2

    enhancement 
    opened by topheman 28
  • Missing Documentation about Texture.Lock

    Missing Documentation about Texture.Lock

    Sorry to bother yet again but I promise it is different this time.

    When locking a Texture for pixel access it requires a *unsafe.Pointer as a pointer to the pixel bytes. So I created a Surface, called .Pixels() on it and created a pointer pointing to the result. However cannot use &pixels (type *[]byte) as type *unsafe.Pointer. In the documentation of unsafe it merely requires a Pointer to an arbitrary type and I think a pointer to a slice filled with pixel bytes is suitable for that description. What am I doing wrong?

    opened by Pixdigit 22
  • Cannot build on windows 10 with latest version of go

    Cannot build on windows 10 with latest version of go

    I have spent two days configuring a simple go app that uses SDL2. I have done this several times on Linux. I have followed instructions from various places.

    1. Started with git-bash. No GCC
    2. MinGW could not get gcc 64
    3. Sdl2 installation instructions do not match anything in MinGW
    4. Full cygwin 64 + gcc 64. Cannot find headers audio.h Copied from SDL zip ld cannot find SDL2, copied from zip followed by a whole chain of dll(s) that could not be found, about 20.

    I have given up... Scrapped cygwin, MinGW and SDL.

    Could somone please look at the instructions for building on windows 10. Why is is so complex? Could it be prebuilt for Win 10 platform.

    Going back to to good old linux for now but I really needto get this working on windows 10 as well.

    I have been doing this sort of thing for years and not been so frustrated for a long time :-(

    Sorry if this is the wrong forum for this but I could not see any other way to discuss this issue!

    support 
    opened by stuartdd 21
  • Window Doesn't Respond Sometimes

    Window Doesn't Respond Sometimes

    I buillt a small 2D game. However, the window becomes non-responsive to any events. The strange part is it works sometimes and doesn't most of the time. I am on a OSX Yoesmite and using go-1.7.

    Below is the main function

    func main() {
    	/* Initilize SDL with all its subsystems.
    	create a Game instance if Intilization is a success */
    	err := sdl.Init(sdl.INIT_EVERYTHING)
    	if err != nil {
    		panic(err)
    	}
    
    	g := new(Game)
    	g.init("Flappy")
    	g.drawTitle("Flappy Bird")
    	g.clear()
    
    	var event sdl.Event
    
    	go g.play() //  Keep moving the background
    
    	running := true
    	fmt.Println("Waiting on events")
    	for running {
    		for event = sdl.PollEvent(); event != nil; event = sdl.PollEvent() {
    			switch event.(type) {
    			case *sdl.QuitEvent:
    				running = false
    				break
    			case *sdl.KeyDownEvent:
    				g.handleKeyEvent(event.(*sdl.KeyDownEvent))
    			}
    		}
    	}
    	quito()
    }
    
    opened by shabinesh 21
  • Example in readme.md doesn't work

    Example in readme.md doesn't work

    Code run:

    package main
    
    import "github.com/veandco/go-sdl2/sdl"
    
    func main() {
    	sdl.Init(sdl.INIT_EVERYTHING)
    
    	window, err := sdl.CreateWindow("test", sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED,
    		800, 600, sdl.WINDOW_SHOWN)
    	if err != nil {
    		panic(err)
    	}
    	defer window.Destroy()
    
    	surface, err := window.GetSurface()
    	if err != nil {
    		panic(err)
    	}
    
    	rect := sdl.Rect{0, 0, 200, 200}
    	surface.FillRect(&rect, 0xffff0000)
    	window.UpdateSurface()
    
    	sdl.Delay(10000)
    	sdl.Quit()
    }
    

    Expected: an 800x600 window with a 200x200 red rectangle in the corner.

    Actual Results: An 800x600 window flashes for 10 seconds, with nothing in it, showing the background of the windowing environment. Linked screenshot.

    Go version: go version go1.7.4 linux/amd64 (also tried on 1.8.3 on debian unstable, same results). Linux version: Ubuntu 17:04.

    % glxinfo | grep "version"
    server glx version string: 1.4
    client glx version string: 1.4
    GLX version: 1.4
        Max core profile version: 3.3
        Max compat profile version: 3.0
        Max GLES1 profile version: 1.1
        Max GLES[23] profile version: 3.0
    OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.3
    OpenGL core profile shading language version string: 3.30
    OpenGL version string: 3.0 Mesa 17.0.3
    OpenGL shading language version string: 1.30
    OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.0.3
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
    
    sdl2-issue 
    opened by jrmiller82 17
  • struct ABI test

    struct ABI test

    I get failed tests with this message on debian linux:

        struct_test.go:75: type size mismatch: MouseWheelEvent(28) != cMouseWheelEvent(24)
    

    This may be a platform or sdl version dependent bug, as the same error does not happen on my macbook when using the same go version.

    opened by cdelorme 17
  • non-utf8 functions in sdl-ttf

    non-utf8 functions in sdl-ttf

    I recently saw, that the sdl-ttf wrapper has latin1 and utf8 support. Since go is utf8-only. I suggest to remove the non-utf8 version, since there is no way of providing a string that is encoded in latin1 (in the non ascii compatible range of course)

    opened by krux02 17
  • Unable to set HapticDirection.dir

    Unable to set HapticDirection.dir

    dir is unexported (https://github.com/veandco/go-sdl2/blob/master/sdl/haptic.go#L46) and has no methods to set it with, so we're currently unable to use it.

    https://wiki.libsdl.org/SDL_HapticDirection

    solved? 
    opened by theGeekPirate 15
  • Creating a stable binding release

    Creating a stable binding release

    The README states that go-sdl2 is not stable right now. Is there anything that needs to happen before someone can tag a version number that we can vendor to?

    opened by velovix 14
  • Exception 0xc0000005 0x1 0x333249 0x6c7bec77 PC=0x6c7bec77 signal arrived during cgo execution

    Exception 0xc0000005 0x1 0x333249 0x6c7bec77 PC=0x6c7bec77 signal arrived during cgo execution

    I have this intermittent problem. Sometimes it crashes on launch.

    package main
    
    import (
        "fmt"
        "runtime"
    
        "github.com/veandco/go-sdl2/sdl"
        "github.com/veandco/go-sdl2/sdl_ttf"
    )
    
    func main() {
        runtime.LockOSThread()
        defer runtime.UnlockOSThread()
    
        ttf.Init()
    
        font, errOpen := ttf.OpenFont("Ubuntu-B.ttf", 300)
        if errOpen != nil {
            panic(errOpen)
        }
        defer font.Close()
    
        window, err := sdl.CreateWindow("test", sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED,
            800, 600, sdl.WINDOW_SHOWN)
        if err != nil {
            panic(err)
        }
        defer window.Destroy()
    
        surface := window.GetSurface()
    
        fontSurface := font.RenderText_Shaded("123", sdl.Color{R: 255, G: 165, B: 0, A: 255}, sdl.Color{R: 0, G: 0, B: 0, A: 255})
        rect := sdl.Rect{surface.W/2 - fontSurface.W/2, surface.H/2 - fontSurface.H/2, 800, 800}
        fontSurface.Blit(nil, surface, &rect)
        fontSurface.Free()
    
        var event sdl.Event
        running := true
    
        for running {
            for event = sdl.PollEvent(); event != nil; event = sdl.PollEvent() {
                switch t := event.(type) {
                case *sdl.QuitEvent:
                    running = false
                case *sdl.MouseMotionEvent:
                    fmt.Printf("[%d ms] MouseMotion\ttype:%d\tid:%d\tx:%d\ty:%d\txrel:%d\tyrel:%d\n",
                        t.Timestamp, t.Type, t.Which, t.X, t.Y, t.XRel, t.YRel)
                case *sdl.MouseButtonEvent:
                    fmt.Printf("[%d ms] MouseButton\ttype:%d\tid:%d\tx:%d\ty:%d\tbutton:%d\tstate:%d\n",
                        t.Timestamp, t.Type, t.Which, t.X, t.Y, t.Button, t.State)
                case *sdl.MouseWheelEvent:
                    fmt.Printf("[%d ms] MouseWheel\ttype:%d\tid:%d\tx:%d\ty:%d\n",
                        t.Timestamp, t.Type, t.Which, t.X, t.Y)
                case *sdl.KeyUpEvent:
                    fmt.Printf("[%d ms] Keyboard\ttype:%d\tsym:%c\tmodifiers:%d\tstate:%d\trepeat:%d\n",
                        t.Timestamp, t.Type, t.Keysym.Sym, t.Keysym.Mod, t.State, t.Repeat)
                }
            }
    
            window.UpdateSurface()
            sdl.Delay(1000 / 30)
        }
    }
    
    Exception 0xc0000005 0x1 0x333249 0x6c7bec77
    PC=0x6c7bec77
    signal arrived during cgo execution
    
    github.com/veandco/go-sdl2/sdl_ttf._Cfunc_SDL_free(0x8ce750)
            d:/dev/go/gopath/src/github.com/veandco/go-sdl2/sdl_ttf/:44 +0x4c
    github.com/veandco/go-sdl2/sdl_ttf.(*Font).RenderText_Shaded(0xc082034018, 0x517010, 0x3, 0xff000000ff00a5ff, 0x2829a0)
            d:/dev/go/gopath/src/github.com/veandco/go-sdl2/sdl_ttf/sdl_ttf.go:110 +0x11c
    main.main()
            D:/Dev/go/Tests/sdl2crash/sdl2.go:32 +0x24b
    
    goroutine 17 [syscall, locked to thread]:
    runtime.goexit()
            c:/go/src/runtime/asm_amd64.s:2232 +0x1
    rax     0x8ce740
    rbx     0x8
    rcx     0x6c85fb60
    rdx     0x333231
    rdi     0xc082025d00
    rsi     0x5bfa60
    rbp     0x22feb0
    rsp     0x22fdf0
    r8      0x1c00bf0e2bb52254
    r9      0x1c00bf0e2c420994
    r10     0x8c0158
    r11     0x280000
    r12     0xff
    r13     0x0
    r14     0x0
    r15     0x0
    rip     0x6c7bec77
    rflags  0x10293
    cs      0x33
    fs      0x53
    gs      0x2b
    
    opened by bbigras 14
  • Unknown event type: 8192

    Unknown event type: 8192

    When creating a new window with sdl.WINDOW_RESIZABLE flag and later attempt at resizing the window or setting full screen through the window.FullScreen() method the program panics with "Unknown event type: 8192". Something similiar also happens when opening the task mananger with CTRL+ALT+DEL

    Full error: C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease250988475/go/src/pkg/runtime/panic.c:266 +0xc8 github.com/veandco/go-sdl2/sdl.goEvent(0xc08405a8c0, 0xc000000001, 0x100000000) C:/Users/Kevin/Desktop/Go/src/github.com/veandco/go-sdl2/sdl/sdl_events.go:438 +0x15a github.com/veandco/go-sdl2/sdl.PollEvent(0x69fbe8, 0x0) C:/Users/Kevin/Desktop/Go/src/github.com/veandco/go-sdl2/sdl/sdl_events.go:383 +0x6a

    OS: Window 8

    opened by Forsevin 13
  • Static compilation on Fedora 37 fails on linker stage for -lasound

    Static compilation on Fedora 37 fails on linker stage for -lasound

    Go version: go1.19.3 linux/amd64 Go-SDL2 version: 0.4.0 SDL2 version: 2.26.0 OS: Fedora Linux Architecture: AMD64

    I tried installing SAASound-devel.x86_64 : Development files for SAASound but no luck. I have a suspicion this SAASound package has nothing to do with the error.

    This is the output I get:

    CGO_ENABLED=1 CC=gcc GOOS=linux GOARCH=amd64 go build -v -tags static -ldflags "-s -w"
    # sdl2
    /usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
    /usr/bin/ld: cannot find -lasound: No such file or directory
    collect2: error: ld returned 1 exit status
    
    make: *** [Makefile:9: static] Error 2
    
    opened by mitjafelicijan 1
  • SDL2_gfx linker error cross compiling from Linux to Windows

    SDL2_gfx linker error cross compiling from Linux to Windows

    Go version: go1.19.3 linux/amd64 Go-SDL2 version: 2.26.1 OS: Linux 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Architecture: AMD64

    I'm am trying to cross compile my project from Linux to Windows. I have followed the main instructions plus the extra advice for compiling for SDL2_gfx #427 so I have the gfx headers in my mingw include directories etc

    I get a linker error: /usr/bin/x86_64-w64-mingw32-ld: cannot find -lSDL2_gfx: No such file or directory

    My build command is :

    env CGO_ENABLED="1" CC="/usr/bin/x86_64-w64-mingw32-gcc" GOOS="windows" CGO_LDFLAGS="-lmingw32 -lSDL2" CGO_CFLAGS="-D_REENTRANT" go build -x ./examples/test_examples.go
    

    Which kind of makes sense because I haven't compiled SDL2_gfx- (this being provided by the DLL I sourced from #427) - but I don't understand the workings of mingw to put it all together. Do I need to build SDL2_gfx using mingw first somehow?

    opened by smagrath 2
  • windows build warning: SDL_GetRevisionNumber

    windows build warning: SDL_GetRevisionNumber

    I got an error when I tried to compile the windows platform (Both compiling with cross-platform and compiling directly on windows gave me an error) macos to windows image

    windows image

    opened by wushu037 5
  • Can't understand the sentences in the readme

    Can't understand the sentences in the readme

    I wrote a program on macos, probably affected by sdl2 so it can not be compiled cross-platform. So I tried to compile the windows exe on windows. when compiling it reported an error image

    I tried to find the answer in the readme, but I couldn't understand it

    The passage:

    Install SDL2 http://libsdl.org/download-2.0.php
    - Extract the SDL2 folder from the archive using a tool like [7zip](http://7-zip.org/)
    - Inside the folder, copy the i686-w64-mingw32 and/or x86_64-w64-mingw32 depending on the architecture you chose into your mingw-w64 folder e.g. C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64
    

    I downloaded sdl2 and only one dll file was available after decompression image

    Which folder does Inside the folder refer to? Where do I copy i686-w64-mingw32 and/or x86_64-w64-mingw32 to mingw-w64?

    opened by wushu037 3
  • Crash on running Go-SDL2 app through Rosetta

    Crash on running Go-SDL2 app through Rosetta

    Hello!

    Just wanted to see if anybody knew anything about this particular issue - I'm the creator of a productivity and organization app known as MasterPlan. It's written with go-sdl2, and has been working pretty well. Normally, I build on GitHub Actions through Mac OS 10.15 - you can see the setup script for the action here.

    However, some M1 Mac users have reported that the app crashes on initial startup for them - looks like it's due to sdl_ttf; this is the result that a user got on attempting to run the program through the terminal.

    MasterPlan.app/Contents/MacOS/MasterPlan ; exit;
    SIGILL: illegal instruction
    PC=0x46d373e m=0 sigcode=1
    signal arrived during cgo execution
    instruction bytes: 0xc5 0xf8 0x57 0xc0 0xc5 0xf8 0x11 0x47 0x28 0xc5 0xf8 0x11 0x47 0x18 0xc5 0xf8
    
    goroutine 1 [syscall, locked to thread]:
    runtime.cgocall(0x4491750, 0xc00029f920)
        /Users/runner/hostedtoolcache/go/1.17.11/x64/src/runtime/cgocall.go:156 +0x5c fp=0xc00029f8f8 sp=0xc00029f8c0 pc=0x40136fc
    github.com/veandco/go-sdl2/ttf._Cfunc_TTF_Init()
        _cgo_gotypes.go:461 +0x48 fp=0xc00029f920 sp=0xc00029f8f8 pc=0x4171a08
    github.com/veandco/go-sdl2/ttf.Init()
        /Users/runner/go/pkg/mod/github.com/veandco/[email protected]/ttf/sdl_ttf.go:56 +0x19 fp=0xc00029f938 sp=0xc00029f920 pc=0x4171f79
    main.main()
        /Users/runner/work/masterplan/masterplan/main.go:186 +0x8ee fp=0xc00029ff80 sp=0xc00029f938 pc=0x443c2ae
    runtime.main()
        /Users/runner/hostedtoolcache/go/1.17.11/x64/src/runtime/proc.go:255 +0x227 fp=0xc00029ffe0 sp=0xc00029ff80 pc=0x4046cc7
    runtime.goexit()
        /Users/runner/hostedtoolcache/go/1.17.11/x64/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00029ffe8 sp=0xc00029ffe0 pc=0x40759a1
    
    rax    0x5b12248
    rbx    0x5b0ea80
    rcx    0x5b0ea80
    rdx    0xffffffffffffffc8
    rdi    0x5b12230
    rsi    0x0
    rbp    0x2092567f0
    rsp    0x2092567f0
    r8     0xe1c
    r9     0xe2d
    r10    0xffffe000
    r11    0x0
    r12    0x5b12230
    r13    0x5b11ea0
    r14    0x4bdff78
    r15    0x0
    rip    0x46d373e
    rflags 0x202
    cs     0x2b
    fs     0x0
    gs     0x0
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.
    Deleting expired sessions...       7 completed.
    

    I've done some research on what this issue could be, but I'm not 100% on the cause. Clearly, it's crashing during the ttf.Init() function call, but I'm not really sure what to make of that. It should be that Rosetta can handle all Intel code and translate it to ARM code on program first run, right?

    I could use some direction in case somebody else has run into something similar before?

    opened by SolarLune 3
Releases(v0.4.0)
  • v0.4.0(Jan 19, 2020)

    v0.4.0

    It's almost Chinese New Year so the author decided to hold back no more for this go-sdl2 release! It will also make for a nice checkpoint for people to settle into while it is developed for the next release.

    What's New

    Updated to SDL2 2.0.10!

    This version brings most of the bindings from SDL2 2.0.6 to the latest version SDL2 2.0.10! They are the ones that are noted in the SDL2 release announcement posts with the exception of some system specific functions (such as Android, WinRT, etc..). More support for those system-specific functions may come within patch version updates! If anything needed is missing, we'd very much appreciate a report via Github issue so we can add it!

    Complementary website for SDL2

    The website has also been in the works to become the hub that provides a more curated and centralized way of sharing how certain things are done using SDL2! It is meant as a complementary website in addition to the official one because the official one focuses more on C and lower-level usage. At the moment, this complementary website is focused on go-sdl2 as it is the only package the author is familiar with the C version being the next step. The main meat of the website is the basic, snippet-based tutorials, project-based tutorials, and external resources. The homepage shall serve as status report that relates to SDL2 development in general. Requests for SDL2-related tutorials are welcome via issues on Github!

    Static build support with Go Module system

    Prior to v0.4.0, the static libraries weren't fetched as they were in a submodule. However, they have now been merged into the repository instead. This fixes static and/or cross-platform build when using the new Go Module system as it didn't fetch the (previously) sub-module go-sdl2-libs. While this may increase the Git repository size, it shouldn't affect its size as a Go Module dependency as the Git history is not included.

    Vulkan support and compatibility with vulkan-go

    Most of the bindings for SDL2 Vulkan functions have been added which was long overdue since SDL2 2.0.6. It has also been written to be compatible with vulkan-go. Thanks @jclc!

    Quieter builds

    In go-sdl2 v0.3.x, there would be warnings that are printed during build when it has functions that are not supported by the older SDL2. In v0.4.x, the warnings have been disabled by default. However, if user wants to enable it, they can set the CGO_CPPFLAGS to -DWARN_OUTDATED. An example is:

    In addition, there is also plenty of fixes in this release and stability of API is even more enforced from here onwards!

    CGO_CPPFLAGS=-DWARN_OUTDATED go get -v github.com/veandco/go-sdl2/sdl
    

    Added

    sdl

    Structs

    • AudioStream
    • DisplayEvent
    • SensorEvent
    • Sensor
    • MouseButtonEvent.Clicks

    Functions

    • Surface.Duplicate()
    • RWops.LoadFileRW()
    • RWops.LoadFile()
    • Renderer.GetMetalLayer()
    • Renderer.GetMetalCommandEncoder()
    • Surface.ColorModel()
    • Surface.Bounds()
    • Surface.At()
    • Surface.Set()
    • Surface.HasColorKey()
    • TextInputEvent.GetText()
    • TextEditingEvent.GetText()
    • FRect.Empty()
    • FRect.Equals()
    • FRect.HasIntersection()
    • FRect.Intersect()
    • FPoint.InRect()
    • GameController.PlayerIndex()
    • GameController.Rumble()
    • Joystick.PlayerIndex()
    • Joystick.Rumble()
    • GameControllerMappingForDeviceIndex()
    • JoystickGetDevicePlayerIndex()
    • HasAVX2()
    • HasNEON()
    • ComposeCustomBlendMode()
    • WarpMouseGlobal()
    • LockJoysticks()
    • UnlockJoysticks()
    • SetYUVConversionMode()
    • GetYUVConversionMode()
    • GetYUVConversionModeForResolution()
    • SensorOpen()
    • SensorFromInstanceID()
    • NumSensors()
    • SensorGetDeviceName()
    • SensorGetDeviceType()
    • SensorGetDeviceNonPortableType()
    • SensorGetDeviceInstanceID()
    • SensorUpdate()
    • GetGlobalMouseState()
    • BytesPerPixel()
    • BitsPerPixel()
    • GetTouchDeviceType()
    • HasAVX512F()
    • IsAndroidTV()
    • IsTablet()

    Constants

    • INIT_SENSOR
    • HINT_AUDIO_RESAMPLING_MODE
    • HINT_RENDER_LOGICAL_SIZE_MODE
    • HINT_MOUSE_NORMAL_SPEED_SCALE
    • HINT_MOUSE_RELATIVE_SPEED_SCALE
    • HINT_TOUCH_MOUSE_EVENTS
    • HINT_WINDOWS_INTRESOURCE_ICON
    • HINT_WINDOWS_INTRESOURCE_ICON_SMALL
    • HINT_IOS_HIDE_HOME_INDICATOR
    • HINT_RETURN_KEY_HIDES_IME
    • HINT_TV_REMOTE_AS_JOYSTICK
    • HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR
    • HINT_VIDEO_DOUBLE_BUFFER
    • HINT_MOUSE_DOUBLE_CLICK_TIME
    • HINT_MOUSE_DOUBLE_CLICK_RADIUS
    • BLENDMODE_INVALID
    • BLENDOPERATION_ADD
    • BLENDOPERATION_SUBTRACT
    • BLENDOPERATION_REV_SUBTRACT
    • BLENDOPERATION_MINIMUM
    • BLENDOPERATION_MAXIMUM
    • BLENDFACTOR_ZERO
    • BLENDFACTOR_ONE
    • BLENDFACTOR_SRC_COLOR
    • BLENDFACTOR_ONE_MINUS_SRC_COLOR
    • BLENDFACTOR_SRC_ALPHA
    • BLENDFACTOR_ONE_MINUS_SRC_ALPHA
    • BLENDFACTOR_DST_COLOR
    • BLENDFACTOR_ONE_MINUS_DST_COLOR
    • BLENDFACTOR_DST_ALPHA
    • BLENDFACTOR_ONE_MINUS_DST_ALPHA
    • YUV_CONVERSION_JPEG
    • YUV_CONVERSION_BT601
    • YUV_CONVERSION_BT709
    • YUV_CONVERSION_AUTOMATIC
    • STANDARD_GRAVITY
    • SENSOR_INVALID
    • SENSOR_UNKNOWN
    • SENSOR_ACCEL
    • SENSOR_GYRO
    • TOUCH_DEVICE_INVALID
    • TOUCH_DEVICE_DIRECT
    • TOUCH_DEVICE_INDIRECT_ABSOLUTE
    • TOUCH_DEVICE_INDIRECT_RELATIVE

    ttf

    Structs

    • Font.GlyphMetrics

    Constants

    • DROPTEXT
    • DROPBEGIN
    • DROPCOMPLETE
    • MOUSEWHEEL_NORMAL
    • MOUSEWHEEL_FLIPPED`
    • SYSWM_WINRT
    • SYSWM_ANDROID
    • SYSWM_VIVANTE
    • GL_CONTEXT_RESET_NOTIFICATION
    • GL_CONTEXT_NO_ERROR
    • GL_CONTEXT_RELEASE_BEHAVIOR
    • GL_FRAMEBUFFER_SRGB_CAPABLE
    • WINDOWEVENT_TAKE_FOCUS
    • WINDOWEVENT_HIT_TEST

    Structs

    • AudioDeviceEvent

    Changed

    sdl

    Functions

    • RWFromMem() (0ee14f91)
    • RWops.FreeRW() to RWops.Free() 0ee14f91
    • RWops.RWsize() to RWops.Size() 0ee14f91
    • RWops.RWseek() to RWops.Seek() 0ee14f91
    • RWops.RWread() to RWops.Read() and RWops.Read2() 0ee14f91
    • RWops.RWtell() to RWops.Tell() 0ee14f91
    • RWops.RWwrite() to RWops.Write() and RWops.Write2() 0ee14f91
    • RWops.RWclose() to RWops.Close() 0ee14f91
    • RWops.RWclose() to RWops.Close() 0ee14f91
    • Window.VulkanCreateSurface to return unsafe.Pointer instead of uintptr 1bad697

    img

    Functions

    • Init() now returns error instead of int
    Source code(tar.gz)
    Source code(zip)
  • v0.3(May 8, 2018)

    v0.3

    What's New

    Complete documentation of the package source code

    Every structures, constants, functions, etc.. now has their own comments for documentation purposes, and they all follow Go's documentation guidelines. You can also visit the original SDL2 function page by following the link that appears on the comment. Many many thanks to @malashin for taking on such a monstrous work!

    More idiomatic function names

    Previously all the functions defined in go-sdl2 follow the native SDL2 such as having underscores, having Get prefix for getters, and even capitalizations such as TouchId in MultiGestureEvent (which has since become TouchID. Now, plenty of functions have started to follow the Go idiomatic naming conventions and more should follow along the road to the next version! You can see the full list of renamed names in BREAKING.md. Thanks again @malashin!

    Examples and its assets now reside in different repository

    Examples and assets have been moved to separate repository to reduce base size of the main go-sdl2 repository. You can visit previous examples at https://github.com/veandco/go-sdl2-examples.

    Standalone programs for multiple platforms

    It is now possible to build standalone, dependency-free executables by fetching the package using the command go get -v -tags static github.com/veandco/go-sdl2/sdl. Thank you very much @gen2brain for the awesome feature!

    JoyDeviceEvent is now split into JoyDeviceAddedEvent and JoyDeviceRemovedEvent

    Previously JoyDeviceEvent has Which field of JoystickID type which is wrong when a device is added. Therefore to match the behavior of native SDL2, we split the JoyDeviceEvent into JoyDeviceAddedEvent which uses int for its Which field, and JoyDeviceRemovedEvent which uses JoystickID for its Which field. This is also thanks to @malashin!

    Event now has GetType() and GetTimestamp() methods

    Previously, to get an Event's type and timestamp, you'd have to type-assert it into one of the specialized types such as WindowEvent or MouseButtonEvent and get them from the public fields Type and Timestamp. Now, you only need to use the common GetType() and GetTimestamp() methods from the base Event interface thanks to @malashin!

    Added

    Functions:

    • SetError()
    • CreateRGBSurfaceWithFormat()
    • CreateRGBSurfaceWithFormatFrom()
    • GetDisplayUsableBounds()
    • GetDisplayDPI()
    • SetWindowOpacity()
    • GetWindowOpacity()

    Constants:

    • DROPTEXT
    • DROPBEGIN
    • DROPCOMPLETE
    • MOUSEWHEEL_NORMAL
    • MOUSEWHEEL_FLIPPED
    • SYSWM_WINRT
    • SYSWM_ANDROID
    • SYSWM_VIVANTE
    • GL_CONTEXT_RESET_NOTIFICATION
    • GL_CONTEXT_NO_ERROR
    • GL_CONTEXT_RELEASE_BEHAVIOR
    • GL_FRAMEBUFFER_SRGB_CAPABLE
    • WINDOWEVENT_TAKE_FOCUS
    • WINDOWEVENT_HIT_TEST

    Structs:

    • AudioDeviceEvent

    Changed

    Functions:

    • LoadWAV()
    • LoadWAVRW()
    • Renderer.GetViewport()
    • Renderer.GetClipRect()
    • GameControllerMapping() into GameController.Mapping()
    • HapticOpen()
    • HapticOpenFromMouse()

    Fixed

    7e50e6a sdl/events: Fix DropEvent stubs #294 4bf5ad0 sdl/events: Fix DropEvent memory leak #274 3e3b649 sdl/events: fix stub function for SDL_AudioDeviceEvent d4575d0 sdl/events: fix stub function for SDL_AudioDeviceEvent b50c282 sdl/haptic: Fix HapticOpened() returning error on success 4156c30 sdl/surface: Fix stub functions 1efc02d sdl/video: Fix ShowMessageBox() 3420e58 sdl/video: Fix error handling 881e1de sdl/video: Fix stub #304

    There is still plenty more of miscellaneous updates that you can check from the curated change log below!

    Other changes

    9b73d5a sdl/haptic: Rename iHapticEffect interface to HapticEffect 0ff46e4 sdl/video: Make GL funcs into Window methods #325 (#326) 8e7373e sdl: Replace ints with booleans (#324) 1cae00e sdl/video: Make several functions return values instead of modifying user-provided values through pointers e5fd0c8 sdl: fix misspellings 99737f8 sdl/haptic: Change HapticEffect to interface instead of union (#316) 2b0e4a2 sdl/haptic: Export Dir from HapticDirection{} #315 930022a sdl/gamecontroller,joystick: Add new bindings for SDL 2.0.6 and 2.0.4 (#313) 8759fe0 sdl/surface_test.go: Fix image path 2ac4c06 sdl/video: Remove unused cMessageBoxData struct d715a56 sdl: Remove yuv_sw_c.go 4223939 sdl/haptic: Update error handling 566b724 sdl/video,render: Update error handling; Add SetError() and INIT_EVENTS 3d9462c sdl/render,video: Fix imports d577b44 sdl/render,video: Update imports c231b93 sdl/filesystem_test.go: Run TestGetBasePath only on SDL >= 2.0.1 87aaee2 sdl/cpuinfo_test.go: Run TestGetSystemRAM only on SDL >= 2.0.1 d3d0a1f sdl/events: add stub function for SDL_AudioDeviceEvent 27e36e0 sdl/events: add stub function for SDL_RENDER_DEVICE_RESET ddb9ec5 sdl/haptic: Make methods return bool and/or error instead of int 8c754f4 sdl/sdl: Add errorFromInt() helper function b565ce2 sdl/events: Merge KeyUpEvent and KeyDownEvent to KeyboardEvent 4e7bc65 sdl/mouse: Add fallback definitions for SDL_MOUSEWHEEL_NORMAL and SDL_MOUSEWHEEL_FLIPPED f2dd51e sdl/sdl_wrapper.h: Remove SDL_WINDOW_ALLOW_HIGHDPI definition 07a75b0 sdl/video: Add missing Window flags starting from SDL 2.0.4 6a5f9c4 sdl/mutex: Change Mutex, Sem, Cond to have methods instead of functions 9f2787c sdl/hints_test.go: Fix TestDelHintCallback to use different value for checking from TestAddHintCallback 4ebcc92 sdl: Change types of coordinate and size variables and parameters from int to int32 e798fe3 sdl/events: Fix tests #274 6cfd4a1 sdl/error: Fix documentation #265 bb8985e sdl/render: Fix typo in documentation fc1c183 sdl/render: Add warning message to SDL_UpdateYUVTexture() if used on older SDL2 versions ae9169a gfx: Change types of coordinate and size variables and parameters from int to int32 2da6abc img: Fix tests #265 e22dc78 ttf/sdl_ttf_test.go: Fix font path d487864 examples/audio_wav_memory: audio_wav_memory.go: Update API 82901b8 examples/text: text.go: Update API 509637d examples/text: Revert sdl.RenderUTF8_Solid() to sdl.RenderUTF8Solid() cad2c8a examples/text: Fixed text example 492f14c examples/opengl: Move gl init call 889be5f examples: Update examples to build with latest API b77db23 README: update the example to work out-of-box on macOS (#319) ff97cb1 README.md: Update Mac OS X to macOS ad8f1e5 README.md: Fix markdown syntax error c07017b README.md: Add a note about SDL_mixer 2.0.2 breaking MP3 playback 8289c73 README.md: Add cross-compiling guide for macOS to Windows c231ca3 README.md: Add links to download libraries for other packages like SDL_image, SDL_mixer, etc.. 4160874 README.md: Remove include flag for Linux-to-Windows cross-compiling as it's already defined 0da67c0 README.md: Add cross-compiling guide for Linux to Windows 50d371f README.md: Add installation note for those wishing to stay with latest stable version a33701c README.md: Update installation command on Fedora 807befe README.md: Update installation command on Arch Linux ce485b4 README.md: Update instructions for Ubuntu 2c2a89d README.md: Add installation instructions for Gentoo 906b4c7 BREAKING.md: Fix typo 48cbef8 Update video.go error handling, add SetError() and INIT_EVENTS f0d6bcc Remove note about "go install" since it's already been done by the "go get" step 33dc0c4 Add BREAKING.md for listing breaking changes between version tags 9887766 Update BREAKING.md

    Source code(tar.gz)
    Source code(zip)
Owner
Ve & Co.
We are a group of people who love to do fun things!
Ve & Co.
A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)

xgbutil is a utility library designed to work with the X Go Binding. This project's main goal is to make various X related tasks easier. For example,

Andrew Gallant 186 Dec 10, 2022
Go binding for GTK

go-gtk WHATS Go bindings for GTK SCREENSHOT INSTALL You can experiment with go-gtk by running the various example programs: git clone https://github.c

mattn 1.9k Jan 5, 2023
The X Go Binding is a low-level API to communicate with the X server. It is modeled on XCB and supports many X extensions.

Note that this project is largely unmaintained as I don't have the time to do or support more development. Please consider using this fork instead: ht

Andrew Gallant 458 Dec 29, 2022
Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly

Introduction Qt is a free and open-source widget toolkit for creating graphical user interfaces as well as cross-platform applications that run on var

null 9.6k Jan 2, 2023
Simple QML binding for Go

Qamel Qamel is a simple QML binding for Go, heavily inspired by therecipe/qt. This package only binds Qt's classes that used for creating a simple QML

null 166 Jan 3, 2023
Qt binding for Go (Golang) aims get Go's compile speed again.

qt.go Qt5 binding for Go (Golang) without CGO that aims to achieve Go's native compile speeds. Instead of using common bindings and heavy C++ wrapper

yatsen1 534 Dec 19, 2022
SDL2 binding for Go

SDL2 binding for Go go-sdl2 is SDL2 wrapped for Go users. It enables interoperability between Go and the SDL2 library which is written in C. That mean

Ve & Co. 1.9k Dec 30, 2022
Go implement D*Lite with SDL2

dstarlite-gosdl Go implement D*Lite with SDL2 使用Go SDL2库实现的D*Lite算法 注意,尽可能使用 go mod ,自动下载依赖库(确保已经安装了SDL2库) 推荐使用Linux或者macOS运行 git clone https://github

joxrays 2 Apr 2, 2022
A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)

xgbutil is a utility library designed to work with the X Go Binding. This project's main goal is to make various X related tasks easier. For example,

Andrew Gallant 186 Dec 10, 2022
A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)

xgbutil is a utility library designed to work with the X Go Binding. This project's main goal is to make various X related tasks easier. For example,

Andrew Gallant 186 Dec 10, 2022
mass-binding-target is a command line tool for generating binding target list by search plot files from disk.

mass-binding-target mass-binding-target is a command line tool for generating binding target list by search plot files from disk. Build Go 1.13 or new

null 0 Nov 5, 2021
A Go language binding for encodeing and decoding data in the bencode format that is used by the BitTorrent peer-to-peer file sharing protocol.

bencode-go A Go language binding for encoding and decoding data in the bencode format that is used by the BitTorrent peer-to-peer file sharing protoco

Jack Palevich 205 Nov 27, 2022
Reflectionless data binding for Go's net/http (not actively maintained)

binding Reflectionless data binding for Go's net/http Features HTTP request data binding Data validation (custom and built-in) Error handling Benefits

Matt Holt 793 Nov 18, 2022
Go binding for the cairo graphics library

go-cairo Go binding for the cairo graphics library Based on Dethe Elza's version https://bitbucket.org/dethe/gocairo but significantly extended and up

Erik Unger 125 Dec 19, 2022
Go OpenCL (GOCL) Binding

gocl Go OpenCL (GOCL) Binding (http://www.gocl.org) Library documentation: http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/ http://www.khron

Rain Liu 85 Jan 25, 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

Christoph Schunk 139 Dec 25, 2022
Go binding for GTK

go-gtk WHATS Go bindings for GTK SCREENSHOT INSTALL You can experiment with go-gtk by running the various example programs: git clone https://github.c

mattn 1.9k Jan 5, 2023
The X Go Binding is a low-level API to communicate with the X server. It is modeled on XCB and supports many X extensions.

Note that this project is largely unmaintained as I don't have the time to do or support more development. Please consider using this fork instead: ht

Andrew Gallant 458 Dec 29, 2022
Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly

Introduction Qt is a free and open-source widget toolkit for creating graphical user interfaces as well as cross-platform applications that run on var

null 9.6k Jan 2, 2023
Go binding to ImageMagick's MagickWand C API

Go Imagick Go Imagick is a Go bind to ImageMagick's MagickWand C API. We support two compatibility branches: master (tag v2.x.x): 6.9.1-7 <= ImageMagi

Go Graphics community 1.5k Jan 6, 2023