Skip to content

vbsw/g2d

Repository files navigation

g2d

Go Reference Go Report Card Stability: Experimental

About

g2d is a framework to create 2D graphic applications. It is published on https://github.com/vbsw/g2d and https://gitlab.com/vbsw/g2d.

Demo is available on https://github.com/vbsw/g2d-demo.

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 (https://golang.org/doc/install). For Cgo install a C compiler (https://jmeubank.github.io/tdm-gcc/).

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

About

experimental 2d framework [DISCONTINUED]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published