aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PlatformReadme/android/readme_android.html
blob: 00cbdde6a1ac0a401f8f13310acda79ac712b8ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>NVIDIA PhysX SDK for Android ReadMe</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
</head>

<body>
<h1 style="TEXT-ALIGN: center">NVIDIA<sup>&reg;</sup> PhysX<sup>&reg;</sup> SDK for Android ReadMe</h1>

<blockquote>

	<h4>Platform Requirements:</h4>
	<ul>
		<li>Android API level 16 (JELLY_BEAN).</li>
	</ul>

	<h4>Location of Binaries:</h4>
	<ul>
		<li>SDK static libraries: Lib/</li>
		<li>NVTX Profiler static libraries: Externals/nvToolsExt/1/lib/armv7/</li>
	</ul>

	<h4>Prerequisites:</h4>
	<ul>
		<li>Android SDK: adb.exe should be in PATH. (upload/install files to device).</li>
		<li>Extract this installer to a path without white spaces in its name.</li>
	</ul>

	<h4>Building Source with the Shipped Makefiles:</h4>
	<ul>
		<li>To reduce the size of the package we removed some external libraries, these have to be copied first to the "externals" folder. Empty folders are already in place to define the layout and the required version.</li>
		<ul>
			<li>Android NDK: Version r9d</li>
			<li>Android SDK: Android-10 Headers needed, (adb for deploying to device)</li>
			<li>Apache Ant: Version 1.8.2.</li>
		</ul>
		<li>Run the Makefiles from within MinGW - MSYS.</li>
		<ul>
			<li>e.g. for building the release build of the Snippets, "cd ./Snippets/compiler/android16/" and run "make release".</li>
			<li>Build configs separately! "make all" is likely to run out of heap memory (msys). See rebase workaround in known issues section.</li>
			<li>Cygwin should work as well after fixing the line endings (d2u). And after correcting the drive letters of absolute paths!</li>
		</ul>
	</ul>
	
	<h4>Helper Scripts to build, deploy and run the SDK libraries and Snippets (Tools/android-dev).</h4>
		Prerequisite environment variables
		<ul>
			<li>ANDROID_CONFIG: {android16} </li>
			<li>MAKE_THREADS: {number of parallel make jobs; adjust this to your CPU} </li>
			<li>JAVA_HOME: Absolute Path to JDK </li>
			<br><i>Example:</i> export ANDROID_CONFIG=android16; export MAKE_THREADS=4; export JAVA_HOME=$PWD/../../externals/jdk
		</ul>
		SDK
		<ul>
			<li>physx-make {clean, debug, checked, profile, release}</li>
			<br><i>Example:</i> physx-make clean; physx-make release
		</ul>
		Snippets
		<ul>
			<li>physx-make {clean, debug, checked, profile, release}</li>
			<li>snippets-make {clean, debug, checked, profile, release}</li>
			<li>snippets-deploy {debug, checked, profile, release} SNIPPET_NAME</li>
			<li>snippets-run {debug, checked, profile, release} SNIPPET_NAME</li>
			<br><i>Example:</i> physx-make clean; physx-make release; snippet-make release; snippet-deploy release HelloWorld
			<br><i>Note: You need a rooted device in order to deploy and run snippets. The scripts assume that files can be read, written and executed in /data and its subfolders. Please mount this folder accordingly or change the script to use a folder with the same access properties (e.g. /data/local).</i>
		</ul>

	<h4>Nsight Profiling Events</h4>
	<ul>
		<li>All builds excpet the Release build of the SDK emits also NVTX (Nsight) events of the SDK profile zones. Therefore your application needs to link against the static libs in externals/nvToolsExt/1/lib/armv7.</li>
		<li>SDK Source owners can disable this for all builds by removing PX_NVTX from the makefiles.</li>
	</ul>

	<h4>Known Issues:</h4>
	<ul>
		<li>Linking against the PhysX libraries: The NDK linker does not resolve library interdependencies by default, therefore you have to either bundle all obj files into a single static library or use the following linker flags to group the PhysX libraries: -Wl,--start-group $(addprefix -l, $(PhysX_libraries)) -Wl,--end-group. In order to avoid the cyclic dependencies, the following libraries are packed into libPhysX3.a by the MakefileslibPhysX3.a: PhysX, PhysXCommon, LowLevel, LowLevelAABB, LowLevelDynamics, LowLevelCloth, LowLevelParticles, SceneQuery, SimulationController, PxTask, PvdSDK and PxProfileSDK.</li>
		<li>Articulations can produce NaNs if the SDK is built with the official NDK. Fixed with patched gcc in NVNDK and since NDK r8e (gcc 4.7).</li>
		<li>Builds fail with: "cc1plus.exe: out of memory allocating N bytes". Try raising the virtual memory size on the build machine or reduce the number of parallel build jobs (in the helper scripts).</li>
		<li>Builds fail with: "Couldn't reserve space for cygwin's heap, Win32 error 0". Try "rebase -b 0x30000000 msys-1.0.dll"</li>
		<li>Aggregates can fail if the SDK is built with the official NDK. Fixed with patched gcc in NVNDK and since NDK r8e (gcc 4.7).</li>
		<li>Profiling builds can be slower than release and checked builds because of different build options (keep frame pointer) and profiling framework overhead.</li>
		<li>There is no rendering support for Snippets on android devices.</li>
	</ul>

	<h4>Limitations:</h4>
	<ul>
		<li>The maximum number of shapes in each scene must be less than 32767.</li>
		<li>The maximum number of dynamic actors added to each scene must be less than 65535.</li>
		<li>The maximum number of broadphase overlap pairs must be less than 65535. Overlap pairs above this limit will be neglected.</li>
	</ul>

</blockquote>



<p><br>
Copyright (C) 2008-2018 NVIDIA Corporation, 2701 San Thomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <A href="http://www.nvidia.com">www.nvidia.com</A>
</p>
</body>
</html>