Before you can render an animation or display video, you must create a window for your application. There are a number of different window types. The following procedure describes how to create a window that can be used to display video.
Although any instances created are destroyed when the application exits, it is best practice to destroy any window and context instances that you created but no longer require. In some cases you must destroy windows and contexts. For example, when an app outlasts the lifespan of contexts and windows without destroying the process, then you must call the appropriate destroy functions.
In this example, you should destroy the window and the context once you have finished using them.
screen_destroy_window(screen_window); screen_destroy_context(screen_context);