vbsw / oglwnd

creates a window with OpenGL 3.0 context [DEPRECATED]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oglwnd

GoDoc Stability: Experimental

About

oglwnd is a package for Go to create a window with OpenGL 3.0 context. It is published on https://github.com/vbsw/oglwnd.

Copyright

Copyright 2021, Vitali Baumtrok (vbsw@mailbox.org).

oglwnd 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)

oglwnd 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/).

// example
package main
import "github.com/vbsw/oglwnd"
import "fmt"

type myHandler struct {
	oglwnd.DefaultHandler
}

func (h *myHandler) OnUpdate(window *oglwnd.Window) error {
	oglwnd.Clear(0.2, 0.2, 0.2, 0)
	return nil
}

func main() {
	err := oglwnd.Start(new(myHandler))
	if err == nil {
		fmt.Println(err.Error())
	}
}

To compile without console on windows use

-ldflags -H=windowsgui

References

About

creates a window with OpenGL 3.0 context [DEPRECATED]

License:Boost Software License 1.0


Languages

Language:C 70.4%Language:Go 29.6%