Tidy up python documentation and add examples

This commit is contained in:
baldurk
2018-06-15 19:43:16 +01:00
parent 45c3c27923
commit 11091f1e54
32 changed files with 1860 additions and 16 deletions
+22 -4
View File
@@ -1,10 +1,28 @@
Python API
==========
The python API is accessible via scripting in the QRenderDoc tool. This gives access to both the base replay API that the UI is built on top of, as well as scripting ability for the UI itself and some higher level utility functionality.
RenderDoc exposes APIs to python at two different levels:
It is also possible to build a standalone module of just the base API which can be loaded into python and used for scripting directly without the UI. Due to the inherent difficulty of distributing C python modules this isn't included by default in distributed builds at the time of writing, but is generated by default in source builds - ``renderdoc.pyd`` on windows or ``renderdoc.so`` elsewhere.
1. The :doc:`base replay API <renderdoc/index>`, the ``renderdoc`` module, which provides low level access to handling capture files, replaying frames and obtaining analysis information. The UI is built entirely on top of this API, so it provides the full power of RenderDoc, however is does not have many convenience abstractions.
2. The :doc:`RenderDoc UI API <qrenderdoc/index>`, the ``qrenderdoc`` module, which exposes the abstractions and panels within the UI tool.
Within RenderDoc - when either running scripts on the command line, or via the :doc:`../window/python_shell` - both modules are pre-imported and available automatically.
It is also possible to build the ``renderdoc`` module standalone which can be loaded into python and used for scripting directly without the UI program. Due to the inherent difficulty of distributing C python modules this isn't included by default in distributed builds at the time of writing, but is generated by default in source builds - ``renderdoc.pyd`` on windows or ``renderdoc.so`` elsewhere.
.. note::
RenderDoc only supports Python 3.4+, Python 2 is not supported.
This documentation contains information on getting started with the scripting, as well as tutorials and examples outline how to perform simple tasks.
Each example has a simple motivating goal and shows how to achieve it using the interfaces provided. They will not show every possible use of the interfaces, but instead give a starting point to build on. Further information about exactly what functionality is available can be found in the API reference below as well as using the python built-in ``help()`` function.
.. toctree::
base/index
qrenderdoc/index
examples/renderdoc_intro
examples/qrenderdoc_intro
examples/basics
examples/renderdoc/index
examples/qrenderdoc/index
renderdoc/index
qrenderdoc/index