Github link

Usually, Go programs use GLFW bindings to create windows and get user input. This approach can work very well, and there are some great bindings out there like this one that make it a fairly painless process. However, bindings, by necessity, don't fit in with the Go way of doing things. Bindings are not Go-gettable because they require C libraries to be installed first and their design generally leans towards a more C-like approach. Windstorm hopes to offer an alternative to bindings that is Go-gettable and more similar to the way Go programmers expect to interact with libraries.

In many ways, Windstorm is used in a similar way to other, similar libraries. However, when it comes to user input, it takes a very different approach. Instead of using callbacks, Windstorm uses channels to communicate events. This allows for greater control over how your program is structured. Input could be managed comfortably within the main loop, handled in a separate goroutine, or set up to simply run functions in a callback-like manner, if you prefer.

As far as drawing is concerned, you're given a OpenGL context to do anything you'd like with. Just make sure to run SwapBuffers to let Windstorm know you're done drawing a frame.

Built With

Share this project:

Updates