|
|
@@ -27,13 +27,15 @@ 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
|
|
|
@@ -56,9 +58,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);
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|