예제 #1
0
파일: simple.go 프로젝트: awpr/Go-GLUT
func main() {
	glut.Init()
	glut.CreateWindow("single triangle")
	glut.DisplayFunc(display)
	glut.ReshapeFunc(reshape)
	glut.MainLoop()
}
예제 #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
파일: draw2dgl.go 프로젝트: xushiwei/draw2d
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()
}
예제 #4
0
func main() {
	glut.Init()
	glut.InitDisplayMode(glut.DOUBLE | glut.RGB)

	// FIXME: gamemode causes crash
	//if (argc > 1 && !strcmp(argv[1], "-fullscreen")) {
	//glut.GameModeString("800x600:32@60")
	//glut.EnterGameMode()
	// } else {
	originalWindow = glut.CreateWindow("asteroids")
	//}

	initWindow()

	glut.MainLoop()

}