Attention
You are viewing PyUnity docs under the develop
branch.
As such, they are only applicable if you installed from source.
Go to https://docs.pyunity.x10.bz/en/latest/ for the most recent
release.
pyunity.window package¶
Subpackages¶
Submodules¶
Module contents¶
Source code: pyunity/window/__init__.py
A module used to load the window providers.
The window is provided by one of three providers: GLFW, PySDL2 and GLUT. When you first import PyUnity, it checks to see if any of the three providers work. The testing order is as above, so GLUT is tested last.
To create your own provider, create a class that has the following methods:
__init__
: initiate your window andcheck to see if it works.
start
: start the main loop in yourwindow. The first parameter is
updateFunc
, 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.