ソースを参照

Merge remote-tracking branch 'origin/release/1.9.x'

Conflicts:
	panda/src/pipeline/pipeline.cxx
rdb 9 年 前
コミット
bd1df2b9ad
2 ファイル変更53 行追加13 行削除
  1. 33 0
      direct/src/p3d/panda3d.pdef
  2. 20 13
      panda/src/pipeline/pipeline.cxx

+ 33 - 0
direct/src/p3d/panda3d.pdef

@@ -291,6 +291,39 @@ class egg(package):
 plugin-path $EGG_ROOT
 load-file-type egg pandaegg
 load-file-type p3ptloader
+
+# These are excerpted from the default Confauto.prc file.
+egg-object-type-portal          <Scalar> portal { 1 }
+egg-object-type-polylight       <Scalar> polylight { 1 }
+egg-object-type-seq24           <Switch> { 1 } <Scalar> fps { 24 }
+egg-object-type-seq12           <Switch> { 1 } <Scalar> fps { 12 }
+egg-object-type-indexed         <Scalar> indexed { 1 }
+egg-object-type-seq10           <Switch> { 1 } <Scalar> fps { 10 }
+egg-object-type-seq8            <Switch> { 1 } <Scalar> fps { 8 }
+egg-object-type-seq6            <Switch> { 1 } <Scalar>  fps { 6 }
+egg-object-type-seq4            <Switch> { 1 } <Scalar>  fps { 4 }
+egg-object-type-seq2            <Switch> { 1 } <Scalar>  fps { 2 }
+
+egg-object-type-binary          <Scalar> alpha { binary }
+egg-object-type-dual            <Scalar> alpha { dual }
+egg-object-type-glass           <Scalar> alpha { blend_no_occlude }
+
+egg-object-type-model           <Model> { 1 }
+egg-object-type-dcs             <DCS> { 1 }
+egg-object-type-notouch         <DCS> { no_touch }
+
+egg-object-type-barrier         <Collide> { Polyset descend }
+egg-object-type-sphere          <Collide> { Sphere descend }
+egg-object-type-invsphere       <Collide> { InvSphere descend }
+egg-object-type-tube            <Collide> { Tube descend }
+egg-object-type-trigger         <Collide> { Polyset descend intangible }
+egg-object-type-trigger-sphere  <Collide> { Sphere descend intangible }
+egg-object-type-floor           <Collide> { Polyset descend level }
+egg-object-type-dupefloor       <Collide> { Polyset keep descend level }
+egg-object-type-bubble          <Collide> { Sphere keep descend }
+egg-object-type-ghost           <Scalar> collide-mask { 0 }
+egg-object-type-glow            <Scalar> blend { add }
+egg-object-type-direct-widget   <Scalar> collide-mask { 0x80000000 } <Collide> { Polyset descend }
 """)
 
 class ode(package):

+ 20 - 13
panda/src/pipeline/pipeline.cxx

@@ -24,22 +24,23 @@ Pipeline *Pipeline::_render_pipeline = (Pipeline *)NULL;
  */
 Pipeline::
 Pipeline(const string &name, int num_stages) :
-  Namable(name)
+  Namable(name),
 #ifdef THREADED_PIPELINE
-  , _lock("Pipeline")
+  _num_stages(num_stages),
+  _lock("Pipeline")
+#else
+  _num_stages(1)
 #endif
 {
 #ifdef THREADED_PIPELINE
-
-/*
- * We maintain all of the cyclers in the world on one of two linked lists.
- * Cyclers that are "clean", which is to say, they have the same value across
- * all pipeline stages, are stored on the _clean list.  Cyclers that are
- * "dirty", which have different values across some pipeline stages, are
- * stored instead on the _dirty list.  Cyclers can move themselves from clean
- * to dirty by calling add_dirty_cycler(), and cyclers get moved from dirty to
- * clean during cycle().
- */
+  // We maintain all of the cyclers in the world on one of two linked
+  // lists.  Cyclers that are "clean", which is to say, they have the
+  // same value across all pipeline stages, are stored on the _clean
+  // list.  Cyclers that are "dirty", which have different values
+  // across some pipeline stages, are stored instead on the _dirty
+  // list.  Cyclers can move themselves from clean to dirty by calling
+  // add_dirty_cycler(), and cyclers get moved from dirty to clean
+  // during cycle().
 
   // To visit each cycler once requires traversing both lists.
   _clean.make_head();
@@ -53,9 +54,15 @@ Pipeline(const string &name, int num_stages) :
   // This flag is true only during the call to cycle().
   _cycling = false;
 
+#else
+  if (num_stages != 1) {
+    pipeline_cat.warning()
+      << "Requested " << num_stages
+      << " pipeline stages but multithreaded render pipelines not enabled in build.\n";
+  }
 #endif  // THREADED_PIPELINE
 
-  set_num_stages(num_stages);
+  nassertv(num_stages >= 1);
 }
 
 /**