예제 #1
0
파일: game.go 프로젝트: WaylandGod/Go2D
//Release all resources
func (game *Game) Exit() {
	freeResources()

	//Destroy the renderer
	game.renderer.Release()

	//Destroy the window
	sdl.DestroyWindow(game.window)

	//Quit SDL_ttf
	sdl.QuitTTF()

	//Quit SDL
	sdl.Quit()
}
예제 #2
0
func (e *PU_Engine) Exit() {
	//Release all resources
	for i := e.resourceList.Front(); i != nil; i = i.Next() {
		res, valid := i.Value.(IResource)
		if valid {
			res.Release()
		}
	}

	//Destroy the renderer
	e.renderer.Release()

	//Destroy the window
	sdl.DestroyWindow(e.window)

	//Quit SDL ttf
	sdl.QuitTTF()
}