Skip to content

Commit 9d0dfd1

Browse files
committed
Updates relating to changes to deploy-ng
1 parent 9c23e6d commit 9d0dfd1

File tree

7 files changed

+106
-18
lines changed

7 files changed

+106
-18
lines changed

distribution/building-binaries.rst

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,14 @@ combination is:
176176
* - p3fmod_audio
177177
- Audio (including 3D audio) support using FMOD (note the licensing!)
178178
* - pandaegg
179-
- Enables support for reading .egg files (usually not necessary)
179+
- Enables support for reading .egg files. Generally, you should not include
180+
this, since .egg files are automatically converted to .bam during build.
180181
* - p3ptloader
181-
- Adds support for additional model formats beyond BAM
182+
- Adds support for additional model formats. You probably want to instead
183+
add those model extensions to the ``bam-model-extensions`` list.
182184
* - p3assimp
183-
- Adds support for additional model formats beyond BAM by using Assimp
185+
- Adds support for additional model formats. You probably want to instead
186+
add those model extensions to the ``bam-model-extensions`` list.
184187

185188
Note that some plug-ins use third-party libraries that may have different
186189
licensing terms from Panda3D. More information about these libraries can be
@@ -198,17 +201,17 @@ versions. The default set is as follows:
198201

199202
.. code-block:: python
200203
201-
'platforms': ['manylinux2010_x86_64', 'macosx_10_9_x86_64', 'win_amd64'],
204+
'platforms': ['manylinux2014_x86_64', 'macosx_10_9_x86_64', 'win_amd64'],
202205
203206
Sometimes, it is desirable to use third-party packages that do not provide
204207
wheels for a given platform. For example, a package may no longer publish wheels
205-
for a ``manylinux2010_x86_64``, but only for ``manylinux2014_x86_64``. If you
206-
wish to use this package, then you need to therefore set the platform tags to
208+
for a ``macosx_10_9_x86_64``, but only for ``macosx_10_13_x86_64``. If you wish
209+
to use this package, then you need to therefore set the platform tags to
207210
increase these versions:
208211

209212
.. code-block:: python
210213
211-
'platforms': ['manylinux2014_x86_64', 'macosx_10_9_x86_64', 'win_amd64'],
214+
'platforms': ['manylinux2014_x86_64', 'macosx_10_13_x86_64', 'win_amd64'],
212215
213216
.. list-table:: List of Platforms
214217
:widths: 20, 80
@@ -217,10 +220,14 @@ increase these versions:
217220
- 64-bit Windows systems (including Intel x64 processors).
218221
* - win32
219222
- 32-bit Windows systems, rarely used nowadays.
220-
* - manylinux2010_x86_64
221-
- Target 64-bit Linux distributions more recent than (more or less) 2010.
222-
* - manylinux2010_i686
223-
- Target 32-bit Linux distributions more recent than (more or less) 2010.
223+
* - manylinux2014_x86_64
224+
- Target 64-bit Linux distributions more recent than (more or less) 2014.
225+
* - manylinux2014_i686
226+
- Target 32-bit Linux distributions more recent than (more or less) 2014.
227+
* - linux_x86_64
228+
- Target 64-bit Linux distributions, letting Panda decide which version.
229+
* - linux_i686
230+
- Target 32-bit Linux distributions, letting Panda decide which version.
224231
* - macosx_10_9_x86_64
225232
- Target Intel Macs running OS X Mavericks or higher. Recommended.
226233
* - android

distribution/list-of-build-options.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,23 @@ file_handlers
8989
9090
The function is run when encountering a file with the given extension.
9191
User-defined file handlers for an extension override the default handler.
92-
By default, there is only one file handler registered: for .egg files, which
93-
runs egg2bam.
92+
93+
bam_model_extensions
94+
A list of model extensions that are automatically converted to .bam during
95+
build. By default, this includes .egg, .gltf and .glb. Change this if you
96+
wish to use :ref:`other file formats <supported-model-formats>` than these,
97+
or if you don't want these models to be converted to .bam during build.
98+
99+
strip_docstrings
100+
If true, which is the default, all docstrings will be removed as an
101+
optimization, and any use of ``__doc__`` will return ``None``. Set this to
102+
false if you need to keep these docstrings for some reason.
103+
104+
prefer_discrete_gpu
105+
On systems with both an integrated and dedicated GPUs, tells the driver that
106+
the application prefers to use the dedicated GPU, which usually provides
107+
higher performance. At the moment, this option is only implemented on
108+
Windows, and only for NVIDIA and AMD graphics cards.
94109

95110
application_id
96111
This field is required by Android and uniquely identifies the application.

distribution/packaging-binaries.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ The ``bdist_apps`` command will make use of ``build_apps.build_base`` and
1717
installers
1818
A dictionary of installers/packages to create for each platform (keys are
1919
strings for the platform, values are strings representing installers,
20-
defaults to gztar for manylinux2010_x86_64/manylinux2010_i386 and zip for
21-
everything else)
20+
defaults to gztar for manylinux and zip for everything else)
2221

2322
Installers
2423
----------

distribution/setuptools-examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Then, we can build the binaries using ``python setup.py build_apps``.
3939

4040
A ``build`` directory will be created and contain a directory for each platform
4141
that binaries were built for. Since no platforms were specified, the defaults
42-
were used (manylinux2010_x86_64, macosx_10_9_x86_64, win_amd64).
42+
were used (manylinux2014_x86_64, macosx_10_9_x86_64, win_amd64).
4343

4444
Note, win32 is missing from the defaults. If a win32 build is desired, then
4545
platforms must be defined in ``setup.py`` and ``win_amd64`` added to the list:
@@ -54,7 +54,7 @@ platforms must be defined in ``setup.py`` and ``win_amd64`` added to the list:
5454
'build_apps': {
5555
'console_apps': {'hello_world': 'main.py'},
5656
'platforms': [
57-
'manylinux2010_x86_64',
57+
'manylinux2014_x86_64',
5858
'macosx_10_9_x86_64',
5959
'win_amd64',
6060
'win32',

optimization/performance-issues/motherboard-integrated-video.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,49 @@ The following code can be used to determine which GPU is in use:
3030
3131
std::cerr << win->get_gsg()->get_driver_vendor() << "\n"
3232
<< win->get_gsg()->get_driver_renderer() << "\n";
33+
34+
Forcing Use of Discrete GPU on Windows
35+
--------------------------------------
36+
37+
On Windows, it is possible to force the NVIDIA and AMD graphics drivers to
38+
automatically select the high-peformance dedicated graphics card, by compiling
39+
special symbols into the main executable.
40+
41+
.. only:: python
42+
43+
While developing, the main executable is ``python.exe``, which does not set
44+
these symbols. But when :ref:`building an application <distribution>`,
45+
build_apps can automatically add these special symbols. Simply add this
46+
option to the build_apps options block in setup.py:
47+
48+
.. code-block:: python
49+
50+
'prefer_discrete_gpu': True,
51+
52+
.. only:: cpp
53+
54+
Simply copy-paste the following symbols into the source file containing your
55+
main entry point:
56+
57+
.. code-block:: cpp
58+
59+
#ifdef _WIN32
60+
extern "C" {
61+
__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
62+
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
63+
}
64+
#endif
65+
66+
Forcing Use of Discrete GPU on Linux
67+
------------------------------------
68+
69+
On Linux, some drivers can be told to use the discrete GPU by setting
70+
``DRI_PRIME=1`` in the environment. However, this is not considered reliable at
71+
this time, so it is not done by Panda3D automatically. It is suggested to
72+
document this as a possibility for your end-users or add an option for this
73+
setting that can be disabled.
74+
75+
When distributing a .desktop file, it is also possible to add the following key
76+
to the file::
77+
78+
PrefersNonDefaultGPU=true

pipeline/gltf-files.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,26 @@ the vertex shader:
131131
132132
binormal = cross(p3d_Normal, p3d_Tangent.xyz) * p3d_Tangent.w
133133
134+
Distributing glTF Models
135+
------------------------
136+
137+
.. only:: python
138+
139+
When :ref:`building your application <distribution>`, glTF models with the
140+
.gltf or .glb models are converted to .bam by default, assuming that they are
141+
referenced in the include_patterns list in setup.py. The .bam extension is
142+
appended after the existing extension, like ``model.gltf.bam``. This will
143+
allow the model loader to automatically look for ``model.gltf.bam`` when
144+
trying to load ``model.gltf``, so that you do not need to change your calls
145+
to :py:meth:`loader.loadModel() <direct.showbase.Loader.Loader.loadModel>`.
146+
147+
.. only:: cpp
148+
149+
To avoid having to include the plug-ins with a distributed application, use
150+
the gltf2bam utility (provided with panda3d-gltf) or write a script to
151+
convert the model to .bam using :meth:`.NodePath.write_bam_file()` and ship
152+
the converted .bam file instead of the original source file.
153+
134154
External Links
135155
--------------
136156

pipeline/model-file-formats.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ For several formats for which Panda3D ships with a to-egg conversion tool,
205205
Panda3D can automatically do the step of converting the model to .egg on load.
206206
For example, Panda3D ships with a flt2egg converter, which can convert
207207
OpenFlight models to the Egg format. If you try to load a .flt file, Panda3D
208-
will implicitly invoke flt2egg behind the scenes.
208+
will implicitly invoke flt2egg behind the scenes. The plug-in responsible for
209+
this is called p3ptloader.
209210

210211
The formats supported by this plug-in are OpenFlight (.flt), LightWave (.lwo),
211212
AutoCAD (.dxf), VRML (.wrl), Direct X (.x), and Wavefront OBJ (.obj).

0 commit comments

Comments
 (0)