Пример #1
0
void Game_Destroy( Game* const game)
{
	printf("Game_Destroy \n");

	Camera_Destroy( game->Camera);
	Mesh_Destroy(game->CubeModel);
	Texture_Destroy(game->DiffuseTexture);

	free(game);

}
Пример #2
0
void Game_Destroy(Game *game)
{
	int i;
	for (i = 0; i < 5; ++i)
		GameObject_Destroy(game->moving_object[i]);
	GameObject_Destroy(game->still_object);
	DirectionalLight_Destroy(game->directional_light);
	Camera_Destroy(game->camera);
	Shader_DestroyProg(game->shader);
	InputHandler_Destroy(game->input_handler);
	WindowContext_Destroy(game->window_context);
	free(game);
	
	SDL_Quit();
}