示例#1
0
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
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()

}