pyunity.window package¶
pyunity.window¶
A module used to load the window providers.
Windows¶
The window is provided by one of three providers: GLFW, Pygame and FreeGLUT. When you first import PyUnity, it checks to see if any of the three providers work. The testing order is as above, so FreeGLUT is tested last.
To create your own provider, create a class that has the following methods:
__init__
: initiate your window and- check to see if it works.
start
: start the main loop in your- window. The first parameter is
update_func
, which is called when you want to do the OpenGL calls.
Check the source code of any of the window providers for an example. If you have a window provider, then please create a new pull request.