Panda3D手册:配置文件

This section will explain about the configuration files that Panda3D uses.

本节将介绍 Panda3D 配置文件的用途。

Configuring Panda3D

Panda3D 配置文件

In the etc subdirectory, you will find a configuration fileConfig.prc. This controls several of Panda's configuration options- does it use OpenGL or DirectX, how much debugging output does itprint, and so forth. The following table lists several of the mostcommonly-used variables.

在 etc 目录中,您会找到一个文件名为 Config.prc 的配置文件。它能够控制 Panda 的一些选项,像是使用 OpenGL 还是 DirectX 、输出多少调试信息等等。下面列出最常用的变量。

For a full documentation about Panda3D's configuration system, click here to view the original documentation file.

完整的配置文件介绍,请点击这里

To know about accessing config variables from within your code, please see Accessing Config Vars in a Program.

了解关于如何在程序中访问配置变量,请参考在程序中访问配置变量。

To get a more complete list of variables, see the list of all config variables.

更多的关于配置变量的信息,请参阅完整的控制变量列表。

Variable变量 Values取值 Default默认值 Details说明
load-display pandagl
pandadx9
pandadx8
tinydisplay
pandagl

Specifies which graphics GSG to use for rendering (OpenGL, Direct3D 8/9 or TinyPanda software rendering)

指定要使用的图形 GSG(OpenGL、Dircet3D 8/9 或是 TinyPanda 软件渲染)

aux-display pandagl
pandadx9
pandadx8
tinydisplay
pandagl

Specifies which graphics GSG to use if the GSG specified in load-display fails; May be specified multiple times to create multiple fallbacks.

指定如果使用 load-display 失败后使用的图形 GSG;可以指定多个。

win-size Number of pixels 640 480

Specifies the size of the Panda3D window

指定 Panda3D 窗口的大小

win-origin Pixel offsets 50 50

Specifies the offset of the Panda3D window

指定 Panda3D 窗口的 offset

window-title Window title Panda

Specifies the title of the Panda3D window

指定 Panda3D 窗口的标题

fullscreen #t
#f
#f

Enables full-screen mode (true or false)

启用全屏模式(true 或是 false)

undecorated #t
#f
#f

Removes border from window (true or false)

移除窗口边框(true 或是 false)

cursor-hidden #t
#f
#f

Hides mouse cursor (true or false)

隐藏鼠标指针(true 或是 false)

sync-video #t
#f
#t

Limits the frame rate to monitor's capabilities

限制帧数

show-frame-rate-meter #t
#f
#f

Shows the frame rate (in frames per second) at the upper right corner of the screen (true or false)

在右上角显示帧数(帧/每秒)(true 或是 false)

notify-level-[package] fatal
error
warning
info
debug
spam
info

Sets notification levels for various Panda3D packages to control the amount of information printed during execution (fatal being least, spam being most)

设置 Panda3D 警告的级别来控制要显示多少信息(fatal 最少,spam 最多)

model-path Path string see config file

Adds specified path to the list of paths searched when loading a model

添加查找载入模型的位置

audio-library-name p3openal_audio
p3fmod_audio
p3miles_audio
null
p3openal_audio

Loads the appropriate audio library

载入合适的音频驱动

want-directtools #t
#f
#t
line commented out

Enables directtools, a suite of interactive object/camera manipulation tools

启用 direct 工具,一个面向物体/摄像机的操作工具

want-tk #t
#f
#t
line commented out

Enables support for using Tkinter/PMW (Python’s wrappers around Tk)

启用 Tkinter/PMW 支持(Python 的打包工具)