INSTALL 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. Panda3D Install
  2. This document describes how to compile and install Panda 3D on a
  3. system for the first time. Panda is a complex project and is not
  4. trivial to install, although it is not really very difficult. Please
  5. do take the time to read this document before starting.
  6. Panda is known to build successfully on Linux, SGI Irix, and Windows
  7. NT/2000/XP. It should also be easily portable to other Unix-based
  8. OpenGL systems with little or no changes (please let us know if you
  9. try this). When compiled by Windows NT/2000/XP, it will then run on a
  10. Windows 98 system, but we have found that Windows 98 is not itself
  11. stable enough to compile the codebase without crashing.
  12. Before you begin to compile Panda, there are a number of optional
  13. support libraries that you may wish to install. None of these are
  14. essential; Panda will build successfully without them, but possibly
  15. without some functionality.
  16. * Python. Panda is itself a C++ project, but it can generate a
  17. seamless Python interface layer to its C++ objects and function
  18. calls. Since Python is an interpreted language with a command
  19. prompt, this provides an excellent way to get interactive control
  20. over the 3-D environment. However, it is not necessary to use the
  21. Python interface; Panda is also perfectly useful without Python, as
  22. a C++ 3-D library.
  23. Other scripting language interfaces are possible, too, in theory.
  24. Panda can generate an interface layer for itself that should be
  25. accessible by any scripting language that can make C function calls
  26. to an external library. We have used this in the past, for
  27. instance, to interface Panda with Squeak, an implementation of
  28. Smalltalk. At the present, the Python interface is the only one we
  29. actively maintain. We use Python 2.2, but almost any version should
  30. work; you can get Python at http://www.python.org .
  31. * NSPR. This is the Netscape Portable Runtime library, an OS
  32. compatibility layer written by the folks at Mozilla for support of
  33. the Netscape browser on different platforms. Panda takes advantage
  34. of NSPR to implement threading and network communications. At the
  35. present, if you do not have NSPR available Panda will not be able to
  36. fork threads and will not provide a networking interface. Aside
  37. from that, the PStats analysis tools (which depend on networking)
  38. will not be built without NSPR. We have compiled Panda with NSPR
  39. version 3 and 4.0, although other versions should also work. You
  40. can download NSPR from http://www.mozilla.org .
  41. * VRPN, the "Virtual Reality Peripheral Network," a peripheral
  42. interface library designed by UNC. This is particularly useful for
  43. interfacing Panda with external devices like trackers and joysticks;
  44. without it, Panda can only interface with the keyboard and mouse.
  45. You can find out about it at http://www.cs.unc.edu/Research/vrpn .
  46. * libjpeg, libtiff, libpng. These free libraries provide support to
  47. Panda for reading and writing JPEG, TIFF, and PNG image files, for
  48. instance for texture images. Even without these libraries, Panda
  49. has built-in support for pbm/pgm/ppm, SGI (rgb), TGA, BMP, and a few
  50. other assorted image types like Alias and SoftImage native formats.
  51. Most Linux systems come with these libraries already installed, and
  52. the version numbers of these libraries is not likely to be
  53. important. You can download libjpeg from the Independent JPEG group
  54. at http://www.ijg.org , libtiff from SGI at
  55. ftp://ftp.sgi.com/graphics/tiff , and libpng from
  56. http://www.libpng.org .
  57. * zlib. This very common free library provides basic
  58. compression/decompression routines, and is the basis for the Unix
  59. gzip tool (among many other things). If available, Panda uses it to
  60. enable storing compressed files within its native multifile format,
  61. as well as in a few other places here and there. It's far from
  62. essential. If you don't have it already, you can get it at
  63. http://www.gzip.org/zlib .
  64. * Fmod. This is a free sound library that our friends at CMU have
  65. recently integrated into Panda. It provides basic support for
  66. playing WAV files, MP3 files, and MIDI files within Panda. Get it
  67. at http://www.fmod.org .
  68. * Freetype. This free library provides support for loading TTF font
  69. files (as well as many other types of font files) directly for
  70. rendering text within Panda (using Panda's TextNode interface, as
  71. well as the whole suite of DirectGui 2-d widgets in direct). If you
  72. do not have this library, you can still render text in Panda, but
  73. you are limited to using fonts that have been pre-generated and
  74. stored in egg files. There are a handful of provided font files of
  75. this nature in the models directory (specifically, cmr12, cmss12,
  76. and cmtt12); these were generated from some of the free fonts
  77. supplied with TeX. This can be found at http://www.freetype.org ;
  78. you will need at least version 2.0.
  79. * OpenSSL. This free library provides an interface to secure SSL
  80. communications (as well as a normal, unsecured TCP/IP library). It
  81. is used to implement the HTTP client code in Panda for communicating
  82. with web servers and/or loading files directly from web servers, in
  83. both normal http and secure https modes. If you do not have any
  84. need to contact web servers with your Panda client, you do not need
  85. to install this library. Find it at http://www.openssl.org . We
  86. used version 0.9.6 or 0.9.7, but if there is a more recent version
  87. it should be fine.
  88. * FFTW, the "Fastest Fourier Transform in the West". This free
  89. whimsically-named library provides the mathematical support for
  90. compressing animation tables into Panda's binary bam format. If
  91. enabled, animation tables can be compressed in a lossy form similar
  92. to jpeg, which provides approximately a 5:1 compression ratio better
  93. than gzip alone even at the most conservative setting. If you don't
  94. need to have particularly small animation files, you don't need this
  95. library. Get it at http://www.fftw.org .
  96. * Gtk--. This is a C++ graphical toolkit library, and is only used
  97. for one application, the PStats viewer for graphical analysis of
  98. real-time performance, which is part of the pandatool package.
  99. Gtk-- only compiles on Unix, and primarily Linux; it is possible to
  100. compile it with considerable difficulty on Irix. (On Windows, you
  101. don't need this, since you will use the pstats viewer built in the
  102. win-stats subdirectory instead.) We have used version 1.2.1. You
  103. can find it at http://www.gtkmm.org .
  104. PANDA'S BUILD PHILOSOPHY
  105. Panda is divided into a number of separate packages, each of which
  106. compiles separately, and each of which generally depends on the ones
  107. before it. The packages are, in order:
  108. dtool - this defines most of the build scripts and local
  109. configuration options for Panda. It also includes the program
  110. "interrogate," which is used to generate the Python interface, as
  111. well as some low-level libraries that are shared both by
  112. interrogate and Panda. It is a fairly small package.
  113. panda - this is the bulk of the C++ Panda code. It contains the 3-D
  114. engine itself, as well as supporting C++ interfaces like
  115. networking, audio, and device interfaces. Expect this package to
  116. take from one to two hours to build from scratch. You must build
  117. and install dtool before you can build panda.
  118. direct - this is the high-level Python interface to Panda. Although
  119. there is some additional C++ interface code here, most of the code
  120. in this package is Python; there is no reason to install this
  121. package if you are not planning on using the Python interface.
  122. DIRECT is an acronym, and has nothing to do with DirectX.
  123. You must build and install dtool and panda before you can build
  124. direct.
  125. pandatool - this is a suite of command-line utilities, written in
  126. C++ using the Panda libraries, that provide useful support
  127. functionality for Panda as a whole, like model-conversion
  128. utilities. You must build and install dtool and panda before you
  129. can build pandatool, although it does not depend on direct.
  130. pandaapp - this holds a few sample applications that link with panda
  131. (and pandatool), but are not generally useful enough to justify
  132. putting them in pandatool. Most of these are not actually
  133. graphical applications; they just take advantage of the various
  134. support libraries (like HTTPClient) that Panda provides. At the
  135. moment, most people probably won't find anything useful here, but
  136. you're welcome to browse; and we will probably add more
  137. applications later.
  138. In graphical form, here are the packages along with a few extras:
  139. +------------------------------+
  140. | Your Python Application Here |
  141. +------------------------------+
  142. |
  143. | +-----------+
  144. | | pandaapp |
  145. | +-----------+
  146. | |
  147. V V
  148. +--------+ +-----------+ +---------------------------+
  149. | direct | | pandatool | | Your C++ Application Here |
  150. +--------+ +-----------+ +---------------------------+
  151. | | |
  152. +-------------+-------------------/
  153. V
  154. +-------+
  155. | panda |
  156. +-------+
  157. |
  158. V
  159. +-------+
  160. | dtool |
  161. +-------+
  162. The arrows above show dependency.
  163. Usually, these packages will be installed as siblings of each other
  164. within the same directory; the build scripts expect this by default,
  165. although other installations are possible.
  166. In order to support multiplatform builds, we do not include makefiles
  167. or project files with the sources. Instead, all the compilation
  168. relationships are defined in a series of files distributed throughout
  169. the source trees, one per directory, called Sources.pp.
  170. A separate program, called ppremake ("Panda pre-make") reads the
  171. various Sources.pp files, as well as any local configuration
  172. definitions you have provided, and generates the actual makefiles that
  173. are appropriate for the current platform and configuration. It is
  174. somewhat akin to the idea of GNU autoconf ("configure"), although it
  175. is both less automatic and more general, and it supports non-Unix
  176. platforms easily.
  177. HOW TO CONFIGURE PANDA FOR YOUR ENVIRONMENT
  178. When you run ppremake within a Panda source tree, it reads in a number
  179. of configure variable definitions given in the file Config.pp in the
  180. root of the dtool package. Many of these variables will already have
  181. definitions that are sensible for you; some will not. You must
  182. customize these variables before you run ppremake.
  183. Normally, rather than modifying dtool/Config.pp directly, you would
  184. create your own, empty Config.pp file in a safe place (for instance,
  185. in your personal home directory) and define just the variables you
  186. need there. The definitions you give in your personal Config.pp file
  187. will override those in the source directory. You will need to set an
  188. environment variable PPREMAKE_CONFIG to the full filename path of your
  189. personal Config.pp (more on this in the platform-specific installation
  190. notes, below). It is also possible simply to modify dtool/Config.pp,
  191. but this is not recommended as it makes it difficult to install
  192. updated versions of Panda.
  193. The syntax of the Config.pp file is something like a cross between the
  194. C preprocessor and Makefile syntax. The full syntax of ppremake
  195. input scripts is described in more detail in another document, but the
  196. most common thing you will need to do is set the value of a variable
  197. using the #define statement. Look in dtool/Config.pp for numerous
  198. examples of this.
  199. Some of the variables you may define within the Config.pp file hold a
  200. true or a false value by nature. It is important to note that you
  201. indicate a variable is true by defining it to some nonempty string
  202. (e.g. "yes" or "1"), and false by defining it to nothing. For
  203. example:
  204. #define HAVE_DX 1
  205. Indicates you have the DirectX SDK installed, while
  206. #define HAVE_DX
  207. Indicates you do not. Do not be tempted to define HAVE_DX to "no" or
  208. "0"; since these are both nonempty strings, they are considered to
  209. represent "true"!
  210. The comments within dtool/Config.pp describe a more complete list of
  211. the variables you may define. The ones that you are most likely to
  212. find useful are:
  213. INSTALL_DIR - this is the prefix of the directory hierarchy into
  214. which Panda should be installed. By default, this is
  215. /usr/local/panda, a fine convention for Unix machines although a
  216. little questionable for Windows environments.
  217. OPTIMIZE - define this to 1, 2, 3, or 4. This is not the same thing
  218. as compiler optimization level; our four levels of OPTIMIZE define
  219. broad combinations of compiler optimizations and debug symbols:
  220. 1 - No compiler optimizations, full debug symbols
  221. 2 - Full compiler optimizations, full debug symbols
  222. (if the compiler supports this)
  223. 3 - Full compiler optimizations, no debug symbols, non-debug heap
  224. 4 - Full optimizations, no debug symbols, and asserts removed
  225. Usually OPTIMIZE 2 or 3 is the most appropriate choice for
  226. development work.
  227. PYTHON_IPATH / PYTHON_LPATH / PYTHON_LIBS - the full pathname to
  228. Python header files, if Python is installed on your system. As of
  229. Python version 2.0, compiling Python interfaces doesn't require
  230. linking with any special libraries, so normally PYTHON_LPATH and
  231. PYTHON_LIBS are left empty.
  232. NSPR_IPATH / NSPR_LPATH / NSPR_LIBS - the full pathname to NSPR
  233. header and library files, and the name of the NSPR library, if
  234. NSPR is installed on your system.
  235. VRPN_IPATH / VRPN_LPATH / VRPN_LIBS - the full pathname to VRPN
  236. header and library files, and the name of the VRPN libraries, if
  237. VRPN is installed on your system.
  238. DX_IPATH / DX_LPATH / DX_LIBS - the full pathname to the DirectX 8.1
  239. SDK header and library files, if you have installed this SDK.
  240. (You must currently install this SDK in order to build DirectX
  241. support for Panda.)
  242. GL_IPATH / GL_LPATH / GL_LIBS - You get the idea. (Normally, OpenGL
  243. is installed in the standard system directories, so you can leave
  244. GL_IPATH and GL_LPATH empty. But if they happen to be installed
  245. somewhere else on your machine, you can fill in the pathnames
  246. here.)
  247. HOW TO BUILD PANDA ON A UNIX SYSTEM
  248. First, make a subdirectory to hold the Panda sources. This can be
  249. anywhere you like; in these examples, we'll assume you build
  250. everything within a directory called "panda3d" in your home directory.
  251. mkdir ~/panda3d
  252. You must compile ppremake before you can begin to compile Panda
  253. itself. Generally, you do something like the following:
  254. cd ~/panda3d/ppremake
  255. ./configure
  256. make
  257. make install
  258. By default, ppremake will install itself in /usr/local/panda/bin, the
  259. same directory that the other Panda binaries will install themselves
  260. to. If you prefer, you can install it in another directory by doing
  261. something like this:
  262. ./configure --prefix=/my/install/directory
  263. If you do this, you will also want to redefine INSTALL_DIR in your
  264. Config.pp to be the same directory (see above). Wherever you install
  265. it, you should make sure the bin directory is included on your search
  266. path, and the corresponding lib directory (e.g. /usr/local/panda/lib)
  267. is on your LD_LIBRARY_PATH (the following example assumes you are
  268. using a csh derivative):
  269. set path=(/usr/local/panda/bin $path)
  270. setenv LD_LIBRARY_PATH /usr/local/panda/lib:$LD_LIBRARY_PATH
  271. If you have a Bourne-shell derivative, e.g. bash, the syntax is:
  272. PATH=/usr/local/panda/bin:$PATH
  273. LD_LIBRARY_PATH=/usr/local/panda/lib:$LD_LIBRARY_PATH
  274. export LD_LIBRARY_PATH
  275. Now you should create your personal Config.pp file, as described
  276. above, and customize whatever variables are appropriate. Be sure to
  277. set the PPREMAKE_CONFIG environment variable to point to it.
  278. setenv PPREMAKE_CONFIG ~/Config.pp
  279. In bash:
  280. PPREMAKE_CONFIG=~/Config.pp
  281. export PPREMAKE_CONFIG
  282. You may find it a good idea to make these environment settings in your
  283. .cshrc or .bashrc file so that they will remain set for future sessions.
  284. Now that you have ppremake, you can test the configuration settings in
  285. your Config.pp file.
  286. cd ~/panda3d/dtool
  287. ppremake
  288. When you run ppremake within the dtool directory, it will generate a
  289. file, dtool_config.h (as well as all of the Makefiles). This file
  290. will be included by all of the Panda3D sources, and reveals the
  291. settings of many of the options you have configured. You should
  292. examine this file to ensure that your settings have been made the way
  293. you expect.
  294. Now you can build the Panda3D sources. Begin with dtool (the current
  295. directory):
  296. make
  297. make install
  298. Once you have successfully built and installed dtool, you can then
  299. build and install panda:
  300. cd ~/panda3d/panda
  301. ppremake
  302. make
  303. make install
  304. After installing panda, you are almost ready to run the program
  305. "pview," which is a basic model viewer program that demonstrates some
  306. Panda functionality. Successfully running pview proves that Panda is
  307. now installed and configured correctly. However, you must set up a
  308. Configrc file to set your runtime configuration options before you can
  309. run Panda and open up a graphics window. See HOW TO RUN PANDA, below.
  310. If you wish, you may also build direct or pandatool:
  311. cd ~/panda3d/direct
  312. ppremake
  313. make
  314. make install
  315. cd ~/panda3d/pandatool
  316. ppremake
  317. make
  318. make install
  319. HOW TO BUILD PANDA ON A WINDOWS SYSTEM, USING CYGWIN
  320. Cygwin is a set of third-party libraries and tools that present a very
  321. Unix-like environment for Windows systems. If you prefer to use a
  322. Unix environment, Cygwin is the way to go. You can download a free
  323. version from http://www.cygwin.com which will have almost everything
  324. you might need, or you can purchase a CD which has some additional
  325. tools (including csh or bash) that you might find useful.
  326. Panda can build and run within a Cygwin environment, but it does not
  327. require it. Note that Cygwin is used strictly as a build environment;
  328. the Cygwin compiler is not used, so no dependency on Cygwin will be
  329. built into Panda. The Panda DLL's that you will generate within a
  330. Cygwin environment will be exactly the same as those you would
  331. generate in a non-Cygwin environment; once built, Panda will run
  332. correctly on any Win32 machine, with or without Cygwin installed.
  333. If you do not wish to install Cygwin for your build environment, see
  334. the instructions below.
  335. If you wish to use Cygwin, there is one important point to keep in
  336. mind. Panda internally uses a Unix-like filename convention; that is,
  337. forward slashes (instead of backslashes) separate directory
  338. components, and there is no leading drive letter on any filename.
  339. These Unix-like filenames are mapped to Windows filenames (with drive
  340. letters and backslashes) when system calls are made.
  341. Cygwin also uses a Unix-like filename convention, and uses a series of
  342. mount commands to control the mapping of Unix filenames to Windows
  343. filenames. Panda is not itself a Cygwin program, and does not read
  344. the Cygwin mount definitions.
  345. That's important enough it's worth repeating. Panda is not aware of
  346. the Cygwin mount points. So a Unix-like filename that makes sense to
  347. a Cygwin command may not be accessible by the same filename from
  348. within Panda.
  349. However, you can set things up so that most of the time, Cygwin and
  350. Panda agree, which is convenient. To do this, it is important to
  351. understand how Panda maps Unix-like filenames to Windows filenames.
  352. * Any relative pathname (that is, a pathname that does not begin
  353. with a leading slash) is left unchanged, except to reverse the
  354. slashes.
  355. * Any full pathname whose topmost directory component is *not* a
  356. single letter is prepended with the contents of the environment
  357. variable PANDA_ROOT.
  358. * Any full pathname whose topmost directory component *is* a single
  359. letter is turned into a drive letter and colon followed by the
  360. remainder of the path. For example, /c/windows/system is turned
  361. into C:\windows\system.
  362. The expectation is that most of the files you will want to access
  363. within Panda will all be within one directory structure, which you
  364. identify by setting the PANDA_ROOT variable. Generally, when you are
  365. using Cygwin, you will want to set this variable to be the same thing
  366. as the root of your Cygwin tree.
  367. For instance, typically Cygwin installs itself in C:\Cygwin. This
  368. means that when you reference the directory /usr/local/bin within
  369. Cygwin, you are actually referring to C:\Cygwin\usr\local\bin. You
  370. should therefore set PANDA_ROOT to C:\Cygwin, so that /usr/local/bin
  371. within Panda will also refer to C:\Cygwin\usr\local\bin.
  372. To sum up: to use Panda within a Cygwin environment,
  373. In tcsh:
  374. setenv PANDA_ROOT 'C:\Cygwin'
  375. or in bash:
  376. PANDA_ROOT='C:\Cygwin'
  377. Follow the instructions under HOW TO BUILD PANDA FOR A UNIX
  378. ENVIRONMENT, above.
  379. HOW TO BUILD PANDA ON A WINDOWS SYSTEM, WITHOUT CYGWIN
  380. Note: although Panda can be built without Cygwin, for the moment we
  381. have dropped support for the Microsoft nmake program (which is not
  382. really supported by Microsoft either). Thus, even though you do not
  383. need to have all of Cygwin installed, you will need to have at least
  384. GNU make. This program is available from Cygwin (make.exe); you can
  385. copy this program from someone who has installed Cygwin, or you can go
  386. to www.cygwin.com and try to install just this one program. You will
  387. also need the support DLL, cygwin1.dll.
  388. You will need a directory for holding the installed Panda. This can
  389. be anywhere you like; in this example we'll assume you use a directory
  390. called "panda3d" on the root of the C drive.
  391. md c:\panda3d
  392. You will first need to build a copy of ppremake.exe. There is a
  393. Microsoft project file in the ppremake directory that will build this.
  394. Once it is built, copy it to the Panda bin directory (which you will
  395. have to make yourself). This will be a directory called "bin" below
  396. the root of the installed directory you created above; for instance,
  397. c:\panda3d\bin.
  398. Make sure the Panda bin and lib directories are on your path, and set
  399. a few environment variables for building. We suggest creating a file
  400. called PandaEnv.bat to hold these commands; then you may invoke this
  401. batch file before every Panda session to set up your environment
  402. properly. Alternatively, you may make these definitions in the
  403. registry.
  404. path c:\panda3d\bin;c:\panda3d\lib;%PATH%
  405. set PANDA_ROOT=c:\
  406. set PPREMAKE_CONFIG=c:\panda3d\Config.pp
  407. Setting PANDA_ROOT specifies the default drive Panda will search for
  408. file references. (Panda internally uses a Unix-like filename
  409. convention, which does not use leading drive letters. See the bullet
  410. points in the Cygwin section, above, describing the rules Panda uses
  411. to map its Unix-like filenames to Windows filenames.)
  412. Now make a directory for building Panda. This may be different from
  413. the directory, above, that holds the installed Panda files; or it may
  414. be the same. In this example we assume you will be building in the
  415. same directory, c:\panda3d.
  416. Now set up your personal Config.pp file to control your local
  417. configuration settings, as described above. We suggest putting it in
  418. the root of the build directory.
  419. edit c:\panda3d\Config.pp
  420. Add at least the following line to your Config.pp file. (You may want
  421. to add additional lines, according to your needs. See HOW TO
  422. CONFIGURE PANDA FOR YOUR ENVIRONMENT, above.)
  423. #define INSTALL_DIR c:\panda3d
  424. Now you should be able to build dtool.
  425. c:
  426. cd \panda3d\dtool
  427. ppremake
  428. make
  429. make install
  430. And then build panda.
  431. c:
  432. cd \panda3d\panda
  433. ppremake
  434. make
  435. make install
  436. And (optionally) build direct.
  437. c:
  438. cd \panda3d\direct
  439. ppremake
  440. make
  441. make install
  442. And (optionally) build pandatool.
  443. c:
  444. cd \panda3d\pandatool
  445. ppremake
  446. make
  447. make install
  448. HOW TO RUN PANDA
  449. Once Panda has been successfully built and installed, you should be
  450. able to run pview to test that everything is working:
  451. pview
  452. The first time you run pview, if you have not yet created a Configrc
  453. file, you should see something like this:
  454. Known pipe types:
  455. No interactive pipe is available! Check your Configrc!
  456. If you get instead an error about some shared library or libraries not
  457. being found, check that your LD_LIBRARY_PATH setting (on Unix) or your
  458. PATH (on Windows) include the directory in which all of the Panda
  459. libraries have been installed (That is, $INSTALL_DIR/lib, or whatever
  460. you set INSTALL_DIR to followed by "lib". On Unix, this defaults to
  461. /usr/local/panda/lib).
  462. If you do get the above error message, you will need to create a
  463. Configrc file to indicate some run-time parameters. This is different
  464. from the Config.pp file you created above, which is only used by
  465. ppremake to define compile-time parameters; the Configrc file is read
  466. every time Panda is started and it defines parameters that control
  467. run-time behavior.
  468. Create a file called Configrc in your home directory (or wherever you
  469. find convenient). Note that this file must have no extension; in
  470. particular, it should not have the extension "txt". Notepad will add
  471. this extension by default, so if you use Notepad to create the file,
  472. you should then rename it so that it does not have the extension
  473. "txt".
  474. For now, add just the line:
  475. load-display pandagl
  476. Or, if you are on Windows and prefer to use DirectX instead of OpenGL,
  477. add instead the line:
  478. load-display pandadx8
  479. Later you may add additional lines here to control the default
  480. behavior of Panda in other ways.
  481. If you do not specify otherwise, Panda will look for the Configrc file
  482. in the current directory, so for now try to run pview from within the
  483. same directory as your Configrc file. If all goes well, it should
  484. open up a window with a blue triangle. You can use the mouse to move
  485. the triangle around. You can also pass the name of an egg file, if
  486. you have one (look in the models directory for some sample egg files),
  487. on the command line, and pview will load up and display the egg file.
  488. If you want to load the Configrc from other than the current
  489. directory, set the following two environment variables:
  490. CONFIG_CONFIG=:configpath=CFG_PATH
  491. CFG_PATH=/my/home/directory
  492. Where /my/home/directory is the name of your home directory (or
  493. wherever you put the Configrc file). Note that forward slashes should
  494. be used, according to the Panda convention. Also note that on
  495. Windows, the path you specify is relative to the directory named by
  496. PANDA_ROOT, unless it begins with a single-letter directory name (see
  497. the explanation of how Panda maps its internal filenames to Windows
  498. filenames, above.)