https://github.com/vbsw/g2d
experimental 2d framework [DISCONTINUED]
https://github.com/vbsw/g2d
2d framework g2d go golang opengl win32
Last synced: 2 months ago
JSON representation
experimental 2d framework [DISCONTINUED]
- Host: GitHub
- URL: https://github.com/vbsw/g2d
- Owner: vbsw
- License: bsl-1.0
- Created: 2022-06-20T13:18:56.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-10-19T12:10:58.000Z (6 months ago)
- Last Synced: 2025-10-19T21:38:51.538Z (6 months ago)
- Topics: 2d, framework, g2d, go, golang, opengl, win32
- Language: C
- Homepage:
- Size: 478 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# g2d
[](https://pkg.go.dev/github.com/vbsw/g2d) [](https://goreportcard.com/report/github.com/vbsw/g2d) [](https://masterminds.github.io/stability/experimental.html)
## About
g2d is a framework to create 2D graphic applications. It is published on and .
Demo is available on .
## Copyright
Copyright 2023, 2025, Vitali Baumtrok (vbsw@mailbox.org).
g2d is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
g2d is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.
## Compile
Install Go (). For Cgo install a C compiler ().
For Windows:
To compile an executable that doesn't open a console, use
-ldflags -H=windowsgui
## Example
package main
import (
"fmt"
"github.com/vbsw/g2d"
"runtime"
)
func init() {
// run Main on main thread
runtime.LockOSThread()
}
func Main() {
g2d.Init()
g2d.MainLoop(new(g2d.WindowImpl))
if g2d.Err != nil {
fmt.Println(g2d.Err.Error())
}
}
## References
- https://go.dev/doc/install
- https://jmeubank.github.io/tdm-gcc/
- https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- https://dave.cheney.net/2013/10/12/how-to-use-conditional-compilation-with-the-go-build-tool
- https://github.com/golang/go/wiki/cgo
- https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies
- https://pkg.go.dev/cmd/link
- https://www.toomanyatoms.com/computer/usb_keyboard_codes.html
- http://ts.thrustmaster.com/download/accessories/pc/hotas/software/TARGET/TARGET_SCRIPT_EDITOR_basics_v1.2_Appendix.pdf