Browse Source

CMake: Some suggestions on how to improve 20_panda.prc

- `win-origin -2 -2`
- Prefer OpenAL over FMOD in default audio selection
- Copy over `model-cache-dir` from makepanda's default prc
Sam Edwards 6 năm trước cách đây
mục cha
commit
a0f9068da8
2 tập tin đã thay đổi với 7 bổ sung11 xóa
  1. 2 2
      panda/src/configfiles/CMakeLists.txt
  2. 5 9
      panda/src/configfiles/panda.prc.in

+ 2 - 2
panda/src/configfiles/CMakeLists.txt

@@ -15,10 +15,10 @@ endif()
 
 if(HAVE_RAD_MSS)
   set(AUDIO_LIBRARY_NAME p3miles_audio)
-elseif(HAVE_FMODEX)
-  set(AUDIO_LIBRARY_NAME p3fmod_audio)
 elseif(HAVE_OPENAL)
   set(AUDIO_LIBRARY_NAME p3openal_audio)
+elseif(HAVE_FMODEX)
+  set(AUDIO_LIBRARY_NAME p3fmod_audio)
 else()
   set(AUDIO_LIBRARY_NAME none)
 endif()

+ 5 - 9
panda/src/configfiles/panda.prc.in

@@ -1,12 +1,3 @@
-//
-// panda.prc.in
-//
-// This file defines the script to auto-generate panda.prc at
-// CMake time.  This is intended to fill in some of the default
-// parameters, in particular the default display types.
-//
-
-#output 20_panda.prc notouch
 #### Generated automatically by CMake ${CMAKE_VERSION} from panda.prc.in.
 ################################# DO NOT EDIT ###########################
 
@@ -16,6 +7,7 @@ model-path $THIS_PRC_DIR/../share/panda3d/models
 
 # Let's set up a default window size of 800x600.  The user can
 # override this in his or her personal prc file.
+win-origin -2 -2
 win-size 800 600
 
 # Define the display types that have been compiled in.  Panda will
@@ -42,6 +34,10 @@ audio-library-name ${AUDIO_LIBRARY_NAME}
 load-file-type egg pandaegg
 default-model-extension .egg
 
+# Enable the model-cache, but only for models, not textures.
+model-cache-dir $XDG_CACHE_HOME/panda3d
+model-cache-textures #f
+
 
 # These entries work very similar to load-file-type, except they are
 # used by the MovieVideo and MovieAudio code to determine which module