示例#1
0
func main() {
	glut.Init();
	glut.InitDisplayMode(glut.GLUT_RGBA | glut.GLUT_DOUBLE)
	glut.InitWindowSize(1024, 480)
	glut.CreateWindow("Test")

	glut.Stuff()
}
示例#2
0
func main() {
	glut.Init()
	glut.InitDisplayMode(glut.SINGLE | glut.RGB)
	glut.InitWindowSize(465, 250)
	glut.CreateWindow("GLUT bitmap & stroke font example")
	gl.ClearColor(1.0, 1.0, 1.0, 1.0)
	gl.Color3f(0, 0, 0)
	gl.LineWidth(3.0)
	glut.DisplayFunc(display)
	glut.ReshapeFunc(reshape)
	glut.MainLoop()
}
示例#3
0
func main() {
	src, err := os.OpenFile("../resource/postscript/tiger.ps", 0, 0)
	if err != nil {
		log.Println("can't find postscript file.")
		return
	}
	defer src.Close()
	bytes, err := ioutil.ReadAll(src)
	postscriptContent = string(bytes)
	glut.Init()
	glut.InitWindowSize(800, 800)
	glut.CreateWindow("Show Tiger in Opengl")

	glut.DisplayFunc(display)
	glut.ReshapeFunc(reshape)
	glut.MainLoop()
}