From f1f496cc29d9c8ceab6788a996553df480273f71 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 11 Jun 2009 02:37:19 +0000 Subject: [PATCH] move lodNodes and sceneGraphAnalyzer to pgraphnodes, in an attempt to reduce size of pgraph some more --- panda/src/downloader/httpChannel.I | 2 +- panda/src/express/ramfile.I | 20 +++++++++++++++++++ panda/src/express/ramfile.h | 2 ++ panda/src/framework/pandaFramework.cxx | 5 ++++- panda/src/pgraph/Sources.pp | 15 -------------- panda/src/pgraph/config_pgraph.cxx | 13 ------------ panda/src/pgraph/config_pgraph.h | 2 -- panda/src/pgraph/nodePath.cxx | 9 ++++++++- panda/src/pgraph/nodePath.h | 2 +- panda/src/pgraph/pgraph_composite2.cxx | 2 -- panda/src/pgraph/pgraph_composite3.cxx | 2 -- panda/src/pgraph/pgraph_composite4.cxx | 1 - panda/src/pgraphnodes/Sources.pp | 9 +++++++++ panda/src/pgraphnodes/config_pgraphnodes.cxx | 13 ++++++++++++ panda/src/pgraphnodes/config_pgraphnodes.h | 4 ++++ .../src/{pgraph => pgraphnodes}/fadeLodNode.I | 0 .../{pgraph => pgraphnodes}/fadeLodNode.cxx | 1 + .../src/{pgraph => pgraphnodes}/fadeLodNode.h | 2 +- .../fadeLodNodeData.cxx | 0 .../{pgraph => pgraphnodes}/fadeLodNodeData.h | 2 +- panda/src/{pgraph => pgraphnodes}/lodNode.I | 0 panda/src/{pgraph => pgraphnodes}/lodNode.cxx | 2 +- panda/src/{pgraph => pgraphnodes}/lodNode.h | 2 +- .../{pgraph => pgraphnodes}/lodNodeType.cxx | 0 .../src/{pgraph => pgraphnodes}/lodNodeType.h | 0 .../pgraphnodes/pgraphnodes_composite1.cxx | 2 ++ .../pgraphnodes/pgraphnodes_composite2.cxx | 3 +++ .../sceneGraphAnalyzer.I | 0 .../sceneGraphAnalyzer.cxx | 0 .../sceneGraphAnalyzer.h | 2 +- panda/src/pipeline/thread.cxx | 6 ++++++ 31 files changed, 79 insertions(+), 44 deletions(-) rename panda/src/{pgraph => pgraphnodes}/fadeLodNode.I (100%) rename panda/src/{pgraph => pgraphnodes}/fadeLodNode.cxx (99%) rename panda/src/{pgraph => pgraphnodes}/fadeLodNode.h (97%) rename panda/src/{pgraph => pgraphnodes}/fadeLodNodeData.cxx (100%) rename panda/src/{pgraph => pgraphnodes}/fadeLodNodeData.h (95%) rename panda/src/{pgraph => pgraphnodes}/lodNode.I (100%) rename panda/src/{pgraph => pgraphnodes}/lodNode.cxx (99%) rename panda/src/{pgraph => pgraphnodes}/lodNode.h (99%) rename panda/src/{pgraph => pgraphnodes}/lodNodeType.cxx (100%) rename panda/src/{pgraph => pgraphnodes}/lodNodeType.h (100%) rename panda/src/{pgraph => pgraphnodes}/sceneGraphAnalyzer.I (100%) rename panda/src/{pgraph => pgraphnodes}/sceneGraphAnalyzer.cxx (100%) rename panda/src/{pgraph => pgraphnodes}/sceneGraphAnalyzer.h (98%) diff --git a/panda/src/downloader/httpChannel.I b/panda/src/downloader/httpChannel.I index b8ef6cdd3a..1231b38f20 100644 --- a/panda/src/downloader/httpChannel.I +++ b/panda/src/downloader/httpChannel.I @@ -329,7 +329,7 @@ get_connect_timeout() const { // false, a socket connect will not block for // nonblocking I/O calls, but will block for blocking // I/O calls (get_document(), connect_to(), etc.). - +// // Setting this true is useful when you want to use // non-blocking I/O once you have established the // connection, but you don't want to bother with polling diff --git a/panda/src/express/ramfile.I b/panda/src/express/ramfile.I index d31e50b7f8..df1d740669 100644 --- a/panda/src/express/ramfile.I +++ b/panda/src/express/ramfile.I @@ -55,3 +55,23 @@ INLINE const string &Ramfile:: get_data() const { return _data; } + +//////////////////////////////////////////////////////////////////// +// Function: Ramfile::get_data_size +// Access: Published +// Description: Returns the size of the entire buffer contents. +//////////////////////////////////////////////////////////////////// +INLINE size_t Ramfile:: +get_data_size() const { + return _data.size(); +} + +//////////////////////////////////////////////////////////////////// +// Function: Ramfile::clear +// Access: Published +// Description: Empties the current buffer contents. +//////////////////////////////////////////////////////////////////// +INLINE void Ramfile:: +clear() { + _data.clear(); +} diff --git a/panda/src/express/ramfile.h b/panda/src/express/ramfile.h index 8473afd998..8f3dafe8cf 100644 --- a/panda/src/express/ramfile.h +++ b/panda/src/express/ramfile.h @@ -34,6 +34,8 @@ PUBLISHED: string readline(); INLINE const string &get_data() const; + INLINE size_t get_data_size() const; + INLINE void clear(); public: size_t _pos; diff --git a/panda/src/framework/pandaFramework.cxx b/panda/src/framework/pandaFramework.cxx index 5c93617302..cfb039e213 100644 --- a/panda/src/framework/pandaFramework.cxx +++ b/panda/src/framework/pandaFramework.cxx @@ -27,6 +27,7 @@ #include "mouseRecorder.h" #include "throw_event.h" #include "executionEnvironment.h" +#include "sceneGraphAnalyzer.h" LoaderOptions PandaFramework::_loader_options; @@ -1199,7 +1200,9 @@ event_A(const Event *, void *data) { node = self->get_models(); } - node.analyze(); + SceneGraphAnalyzer sga; + sga.add_node(node.node()); + sga.write(nout); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/Sources.pp b/panda/src/pgraph/Sources.pp index 40ca416052..acea31e1ee 100644 --- a/panda/src/pgraph/Sources.pp +++ b/panda/src/pgraph/Sources.pp @@ -47,8 +47,6 @@ depthTestAttrib.I depthTestAttrib.h \ depthWriteAttrib.I depthWriteAttrib.h \ eventStorePandaNode.I eventStorePandaNode.h \ - fadeLodNode.I fadeLodNode.h \ - fadeLodNodeData.h \ findApproxLevelEntry.I findApproxLevelEntry.h \ findApproxPath.I findApproxPath.h \ fog.I fog.h \ @@ -65,8 +63,6 @@ loaderFileType.h \ loaderFileTypeBam.h \ loaderFileTypeRegistry.h \ - lodNode.I lodNode.h \ - lodNodeType.h \ materialAttrib.I materialAttrib.h \ materialCollection.I materialCollection.h \ modelFlattenRequest.I modelFlattenRequest.h \ @@ -92,7 +88,6 @@ renderModeAttrib.I renderModeAttrib.h \ renderState.I renderState.h \ rescaleNormalAttrib.I rescaleNormalAttrib.h \ - sceneGraphAnalyzer.h sceneGraphAnalyzer.I \ sceneGraphReducer.I sceneGraphReducer.h \ sceneSetup.I sceneSetup.h \ scissorAttrib.I scissorAttrib.h \ @@ -150,8 +145,6 @@ depthTestAttrib.cxx \ depthWriteAttrib.cxx \ eventStorePandaNode.cxx \ - fadeLodNode.cxx \ - fadeLodNodeData.cxx \ findApproxLevelEntry.cxx \ findApproxPath.cxx \ fog.cxx \ @@ -168,8 +161,6 @@ loaderFileType.cxx \ loaderFileTypeBam.cxx \ loaderFileTypeRegistry.cxx \ - lodNode.cxx \ - lodNodeType.cxx \ materialAttrib.cxx \ materialCollection.cxx \ modelFlattenRequest.cxx \ @@ -194,7 +185,6 @@ renderModeAttrib.cxx \ renderState.cxx \ rescaleNormalAttrib.cxx \ - sceneGraphAnalyzer.cxx \ sceneGraphReducer.cxx \ sceneSetup.cxx \ scissorAttrib.cxx \ @@ -251,8 +241,6 @@ depthTestAttrib.I depthTestAttrib.h \ depthWriteAttrib.I depthWriteAttrib.h \ eventStorePandaNode.I eventStorePandaNode.h \ - fadeLodNode.I fadeLodNode.h \ - fadeLodNodeData.h \ fog.I fog.h \ fogAttrib.I fogAttrib.h \ geomDrawCallbackData.I geomDrawCallbackData.h \ @@ -267,8 +255,6 @@ loaderFileType.h \ loaderFileTypeBam.h \ loaderFileTypeRegistry.h \ - lodNode.I lodNode.h \ - lodNodeType.h \ materialAttrib.I materialAttrib.h \ materialCollection.I materialCollection.h \ modelFlattenRequest.I modelFlattenRequest.h \ @@ -294,7 +280,6 @@ renderModeAttrib.I renderModeAttrib.h \ renderState.I renderState.h \ rescaleNormalAttrib.I rescaleNormalAttrib.h \ - sceneGraphAnalyzer.h sceneGraphAnalyzer.I \ sceneGraphReducer.I sceneGraphReducer.h \ sceneSetup.I sceneSetup.h \ scissorAttrib.I scissorAttrib.h \ diff --git a/panda/src/pgraph/config_pgraph.cxx b/panda/src/pgraph/config_pgraph.cxx index 95948df59a..26c83f3d77 100644 --- a/panda/src/pgraph/config_pgraph.cxx +++ b/panda/src/pgraph/config_pgraph.cxx @@ -38,8 +38,6 @@ #include "depthWriteAttrib.h" #include "eventStorePandaNode.h" #include "findApproxLevelEntry.h" -#include "fadeLodNode.h" -#include "fadeLodNodeData.h" #include "fog.h" #include "fogAttrib.h" #include "geomDrawCallbackData.h" @@ -53,7 +51,6 @@ #include "loaderFileType.h" #include "loaderFileTypeBam.h" #include "loaderFileTypeRegistry.h" -#include "lodNode.h" #include "materialAttrib.h" #include "modelFlattenRequest.h" #include "modelLoadRequest.h" @@ -382,11 +379,6 @@ ConfigVariableString default_model_extension "Panda's loader; new code should probably give the correct name " "for each model file they intend to load.")); -ConfigVariableEnum default_lod_type -("default-lod-type", LNT_pop, - PRC_DESC("Set this to either 'pop' or 'fade' to determine the type of " - "LODNode that is created by LODNode::make_default_lod().")); - ConfigVariableBool allow_live_flatten ("allow-live-flatten", true, PRC_DESC("Set this true to allow the use of flatten_strong() or any " @@ -435,8 +427,6 @@ init_libpgraph() { DepthTestAttrib::init_type(); DepthWriteAttrib::init_type(); EventStorePandaNode::init_type(); - FadeLODNode::init_type(); - FadeLODNodeData::init_type(); FindApproxLevelEntry::init_type(); Fog::init_type(); FogAttrib::init_type(); @@ -448,7 +438,6 @@ init_libpgraph() { LightAttrib::init_type(); LightRampAttrib::init_type(); Loader::init_type(); - LODNode::init_type(); LoaderFileType::init_type(); LoaderFileTypeBam::init_type(); MaterialAttrib::init_type(); @@ -512,14 +501,12 @@ init_libpgraph() { DepthOffsetAttrib::register_with_read_factory(); DepthTestAttrib::register_with_read_factory(); DepthWriteAttrib::register_with_read_factory(); - FadeLODNode::register_with_read_factory(); Fog::register_with_read_factory(); FogAttrib::register_with_read_factory(); GeomNode::register_with_read_factory(); LensNode::register_with_read_factory(); LightAttrib::register_with_read_factory(); LightRampAttrib::register_with_read_factory(); - LODNode::register_with_read_factory(); MaterialAttrib::register_with_read_factory(); ModelNode::register_with_read_factory(); ModelRoot::register_with_read_factory(); diff --git a/panda/src/pgraph/config_pgraph.h b/panda/src/pgraph/config_pgraph.h index 1b5148b4be..ce22448595 100644 --- a/panda/src/pgraph/config_pgraph.h +++ b/panda/src/pgraph/config_pgraph.h @@ -22,7 +22,6 @@ #include "configVariableInt.h" #include "configVariableDouble.h" #include "configVariableList.h" -#include "lodNodeType.h" class DSearchPath; @@ -77,7 +76,6 @@ extern ConfigVariableBool m_dual_flash; extern ConfigVariableList load_file_type; extern ConfigVariableString default_model_extension; -extern ConfigVariableEnum default_lod_type; extern ConfigVariableBool allow_live_flatten; extern EXPCL_PANDA_PGRAPH void init_libpgraph(); diff --git a/panda/src/pgraph/nodePath.cxx b/panda/src/pgraph/nodePath.cxx index 2a5b0c6c90..2ff212c41e 100644 --- a/panda/src/pgraph/nodePath.cxx +++ b/panda/src/pgraph/nodePath.cxx @@ -52,7 +52,6 @@ #include "plist.h" #include "boundingSphere.h" #include "geomNode.h" -#include "sceneGraphAnalyzer.h" #include "sceneGraphReducer.h" #include "textureCollection.h" #include "textureStageCollection.h" @@ -6056,6 +6055,13 @@ calc_tight_bounds(LPoint3f &min_point, LPoint3f &max_point, return found_any; } +/* + +NB: Had to remove this function to avoid circular dependency when +moving SceneGraphAnalyzer into pgraphnodes, attempting to reduce size +of pgraph. This function is now defined as a Python extension +function instead. + //////////////////////////////////////////////////////////////////// // Function: NodePath::analyze // Access: Published @@ -6089,6 +6095,7 @@ analyze() const { sga.write(nout); } } +*/ //////////////////////////////////////////////////////////////////// // Function: NodePath::flatten_light diff --git a/panda/src/pgraph/nodePath.h b/panda/src/pgraph/nodePath.h index 57ad79324e..e251ff524c 100644 --- a/panda/src/pgraph/nodePath.h +++ b/panda/src/pgraph/nodePath.h @@ -821,7 +821,7 @@ PUBLISHED: bool calc_tight_bounds(LPoint3f &min_point, LPoint3f &max_point, Thread *current_thread = Thread::get_current_thread()) const; - void analyze() const; + // void analyze() const; int flatten_light(); int flatten_medium(); diff --git a/panda/src/pgraph/pgraph_composite2.cxx b/panda/src/pgraph/pgraph_composite2.cxx index 3782bc27b5..a3980ff748 100644 --- a/panda/src/pgraph/pgraph_composite2.cxx +++ b/panda/src/pgraph/pgraph_composite2.cxx @@ -14,8 +14,6 @@ #include "depthWriteAttrib.cxx" #include "alphaTestAttrib.cxx" #include "eventStorePandaNode.cxx" -#include "fadeLodNode.cxx" -#include "fadeLodNodeData.cxx" #include "findApproxPath.cxx" #include "findApproxLevelEntry.cxx" #include "fog.cxx" diff --git a/panda/src/pgraph/pgraph_composite3.cxx b/panda/src/pgraph/pgraph_composite3.cxx index 2d219ce87f..498df69807 100644 --- a/panda/src/pgraph/pgraph_composite3.cxx +++ b/panda/src/pgraph/pgraph_composite3.cxx @@ -7,8 +7,6 @@ #include "loaderFileType.cxx" #include "loaderFileTypeBam.cxx" #include "loaderFileTypeRegistry.cxx" -#include "lodNode.cxx" -#include "lodNodeType.cxx" #include "materialAttrib.cxx" #include "materialCollection.cxx" #include "modelFlattenRequest.cxx" diff --git a/panda/src/pgraph/pgraph_composite4.cxx b/panda/src/pgraph/pgraph_composite4.cxx index b22dfe6a91..bbed22af3e 100644 --- a/panda/src/pgraph/pgraph_composite4.cxx +++ b/panda/src/pgraph/pgraph_composite4.cxx @@ -5,7 +5,6 @@ #include "renderModeAttrib.cxx" #include "renderState.cxx" #include "rescaleNormalAttrib.cxx" -#include "sceneGraphAnalyzer.cxx" #include "sceneGraphReducer.cxx" #include "scissorAttrib.cxx" #include "scissorEffect.cxx" diff --git a/panda/src/pgraphnodes/Sources.pp b/panda/src/pgraphnodes/Sources.pp index 97d258d12d..2598b89d3c 100644 --- a/panda/src/pgraphnodes/Sources.pp +++ b/panda/src/pgraphnodes/Sources.pp @@ -16,10 +16,13 @@ callbackNode.h callbackNode.I \ config_pgraphnodes.h \ directionalLight.h directionalLight.I \ + fadeLodNode.I fadeLodNode.h fadeLodNodeData.h \ lightLensNode.h lightLensNode.I \ lightNode.h lightNode.I \ + lodNode.I lodNode.h lodNodeType.h \ nodeCullCallbackData.h nodeCullCallbackData.I \ pointLight.h pointLight.I \ + sceneGraphAnalyzer.h sceneGraphAnalyzer.I \ selectiveChildNode.h selectiveChildNode.I \ sequenceNode.h sequenceNode.I \ shaderGenerator.h shaderGenerator.I \ @@ -31,10 +34,13 @@ callbackNode.cxx \ config_pgraphnodes.cxx \ directionalLight.cxx \ + fadeLodNode.cxx fadeLodNodeData.cxx \ lightLensNode.cxx \ lightNode.cxx \ + lodNode.cxx lodNodeType.cxx \ nodeCullCallbackData.cxx \ pointLight.cxx \ + sceneGraphAnalyzer.cxx \ selectiveChildNode.cxx \ sequenceNode.cxx \ shaderGenerator.cxx \ @@ -46,10 +52,13 @@ callbackNode.h callbackNode.I \ config_pgraphnodes.h \ directionalLight.h directionalLight.I \ + fadeLodNode.I fadeLodNode.h fadeLodNodeData.h \ lightLensNode.h lightLensNode.I \ lightNode.h lightNode.I \ + lodNode.I lodNode.h lodNodeType.h \ nodeCullCallbackData.h nodeCullCallbackData.I \ pointLight.h pointLight.I \ + sceneGraphAnalyzer.h sceneGraphAnalyzer.I \ selectiveChildNode.h selectiveChildNode.I \ sequenceNode.h sequenceNode.I \ shaderGenerator.h shaderGenerator.I \ diff --git a/panda/src/pgraphnodes/config_pgraphnodes.cxx b/panda/src/pgraphnodes/config_pgraphnodes.cxx index 8a1c18af7d..78eff70514 100644 --- a/panda/src/pgraphnodes/config_pgraphnodes.cxx +++ b/panda/src/pgraphnodes/config_pgraphnodes.cxx @@ -19,8 +19,11 @@ #include "callbackNode.h" #include "callbackObject.h" #include "directionalLight.h" +#include "fadeLodNode.h" +#include "fadeLodNodeData.h" #include "lightLensNode.h" #include "lightNode.h" +#include "lodNode.h" #include "nodeCullCallbackData.h" #include "pointLight.h" #include "selectiveChildNode.h" @@ -38,6 +41,11 @@ ConfigureFn(config_pgraphnodes) { init_libpgraphnodes(); } +ConfigVariableEnum default_lod_type +("default-lod-type", LNT_pop, + PRC_DESC("Set this to either 'pop' or 'fade' to determine the type of " + "LODNode that is created by LODNode::make_default_lod().")); + //////////////////////////////////////////////////////////////////// // Function: init_libpgraphnodes // Description: Initializes the library. This must be called at @@ -59,8 +67,11 @@ init_libpgraphnodes() { CallbackNode::init_type(); CallbackObject::init_type(); DirectionalLight::init_type(); + FadeLODNode::init_type(); + FadeLODNodeData::init_type(); LightLensNode::init_type(); LightNode::init_type(); + LODNode::init_type(); NodeCullCallbackData::init_type(); PointLight::init_type(); SelectiveChildNode::init_type(); @@ -72,8 +83,10 @@ init_libpgraphnodes() { AmbientLight::register_with_read_factory(); CallbackNode::register_with_read_factory(); DirectionalLight::register_with_read_factory(); + FadeLODNode::register_with_read_factory(); LightLensNode::register_with_read_factory(); LightNode::register_with_read_factory(); + LODNode::register_with_read_factory(); PointLight::register_with_read_factory(); SelectiveChildNode::register_with_read_factory(); SequenceNode::register_with_read_factory(); diff --git a/panda/src/pgraphnodes/config_pgraphnodes.h b/panda/src/pgraphnodes/config_pgraphnodes.h index e3f926976c..a716176f24 100644 --- a/panda/src/pgraphnodes/config_pgraphnodes.h +++ b/panda/src/pgraphnodes/config_pgraphnodes.h @@ -16,12 +16,16 @@ #define CONFIG_PGRAPHNODES_H #include "pandabase.h" +#include "lodNodeType.h" +#include "configVariableEnum.h" class DSearchPath; ConfigureDecl(config_pgraphnodes, EXPCL_PANDA_PGRAPHNODES, EXPTP_PANDA_PGRAPHNODES); NotifyCategoryDecl(pgraphnodes, EXPCL_PANDA_PGRAPHNODES, EXPTP_PANDA_PGRAPHNODES); +extern ConfigVariableEnum default_lod_type; + extern EXPCL_PANDA_PGRAPHNODES void init_libpgraphnodes(); #endif diff --git a/panda/src/pgraph/fadeLodNode.I b/panda/src/pgraphnodes/fadeLodNode.I similarity index 100% rename from panda/src/pgraph/fadeLodNode.I rename to panda/src/pgraphnodes/fadeLodNode.I diff --git a/panda/src/pgraph/fadeLodNode.cxx b/panda/src/pgraphnodes/fadeLodNode.cxx similarity index 99% rename from panda/src/pgraph/fadeLodNode.cxx rename to panda/src/pgraphnodes/fadeLodNode.cxx index ff61d20b88..9d0d555ed8 100755 --- a/panda/src/pgraph/fadeLodNode.cxx +++ b/panda/src/pgraphnodes/fadeLodNode.cxx @@ -21,6 +21,7 @@ #include "depthWriteAttrib.h" #include "transparencyAttrib.h" #include "cullBinAttrib.h" +#include "depthOffsetAttrib.h" TypeHandle FadeLODNode::_type_handle; diff --git a/panda/src/pgraph/fadeLodNode.h b/panda/src/pgraphnodes/fadeLodNode.h similarity index 97% rename from panda/src/pgraph/fadeLodNode.h rename to panda/src/pgraphnodes/fadeLodNode.h index 5aef7db0ac..a9abcd83ef 100755 --- a/panda/src/pgraph/fadeLodNode.h +++ b/panda/src/pgraphnodes/fadeLodNode.h @@ -23,7 +23,7 @@ // Class : FadeLODNode // Description : A Level-of-Detail node with alpha based switching. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_PGRAPH FadeLODNode : public LODNode { +class EXPCL_PANDA_PGRAPHNODES FadeLODNode : public LODNode { PUBLISHED: FadeLODNode(const string &name); diff --git a/panda/src/pgraph/fadeLodNodeData.cxx b/panda/src/pgraphnodes/fadeLodNodeData.cxx similarity index 100% rename from panda/src/pgraph/fadeLodNodeData.cxx rename to panda/src/pgraphnodes/fadeLodNodeData.cxx diff --git a/panda/src/pgraph/fadeLodNodeData.h b/panda/src/pgraphnodes/fadeLodNodeData.h similarity index 95% rename from panda/src/pgraph/fadeLodNodeData.h rename to panda/src/pgraphnodes/fadeLodNodeData.h index fd8730ac34..4ee59bff1a 100644 --- a/panda/src/pgraph/fadeLodNodeData.h +++ b/panda/src/pgraphnodes/fadeLodNodeData.h @@ -24,7 +24,7 @@ // Description : This is the data that is associated with a particular // instance of the FadeLODNode for the scene graph. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_PGRAPH FadeLODNodeData : public AuxSceneData { +class EXPCL_PANDA_PGRAPHNODES FadeLODNodeData : public AuxSceneData { public: enum FadeMode { FM_solid, diff --git a/panda/src/pgraph/lodNode.I b/panda/src/pgraphnodes/lodNode.I similarity index 100% rename from panda/src/pgraph/lodNode.I rename to panda/src/pgraphnodes/lodNode.I diff --git a/panda/src/pgraph/lodNode.cxx b/panda/src/pgraphnodes/lodNode.cxx similarity index 99% rename from panda/src/pgraph/lodNode.cxx rename to panda/src/pgraphnodes/lodNode.cxx index 1c7882e770..2d93155286 100644 --- a/panda/src/pgraph/lodNode.cxx +++ b/panda/src/pgraphnodes/lodNode.cxx @@ -16,7 +16,7 @@ #include "fadeLodNode.h" #include "cullTraverserData.h" #include "cullTraverser.h" -#include "config_pgraph.h" +#include "config_pgraphnodes.h" #include "geomVertexData.h" #include "geomVertexWriter.h" #include "geomVertexFormat.h" diff --git a/panda/src/pgraph/lodNode.h b/panda/src/pgraphnodes/lodNode.h similarity index 99% rename from panda/src/pgraph/lodNode.h rename to panda/src/pgraphnodes/lodNode.h index 16234fa367..3516be4f78 100644 --- a/panda/src/pgraph/lodNode.h +++ b/panda/src/pgraphnodes/lodNode.h @@ -28,7 +28,7 @@ // from the camera and the table indicated in the // associated LOD object. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_PGRAPH LODNode : public PandaNode { +class EXPCL_PANDA_PGRAPHNODES LODNode : public PandaNode { PUBLISHED: INLINE LODNode(const string &name); diff --git a/panda/src/pgraph/lodNodeType.cxx b/panda/src/pgraphnodes/lodNodeType.cxx similarity index 100% rename from panda/src/pgraph/lodNodeType.cxx rename to panda/src/pgraphnodes/lodNodeType.cxx diff --git a/panda/src/pgraph/lodNodeType.h b/panda/src/pgraphnodes/lodNodeType.h similarity index 100% rename from panda/src/pgraph/lodNodeType.h rename to panda/src/pgraphnodes/lodNodeType.h diff --git a/panda/src/pgraphnodes/pgraphnodes_composite1.cxx b/panda/src/pgraphnodes/pgraphnodes_composite1.cxx index 9f65854cfc..94b499f94f 100644 --- a/panda/src/pgraphnodes/pgraphnodes_composite1.cxx +++ b/panda/src/pgraphnodes/pgraphnodes_composite1.cxx @@ -2,5 +2,7 @@ #include "callbackNode.cxx" #include "config_pgraphnodes.cxx" #include "directionalLight.cxx" +#include "fadeLodNode.cxx" +#include "fadeLodNodeData.cxx" #include "lightLensNode.cxx" #include "lightNode.cxx" diff --git a/panda/src/pgraphnodes/pgraphnodes_composite2.cxx b/panda/src/pgraphnodes/pgraphnodes_composite2.cxx index 6c76e59eac..7092b162a4 100644 --- a/panda/src/pgraphnodes/pgraphnodes_composite2.cxx +++ b/panda/src/pgraphnodes/pgraphnodes_composite2.cxx @@ -1,5 +1,8 @@ +#include "lodNode.cxx" +#include "lodNodeType.cxx" #include "nodeCullCallbackData.cxx" #include "pointLight.cxx" +#include "sceneGraphAnalyzer.cxx" #include "selectiveChildNode.cxx" #include "sequenceNode.cxx" #include "shaderGenerator.cxx" diff --git a/panda/src/pgraph/sceneGraphAnalyzer.I b/panda/src/pgraphnodes/sceneGraphAnalyzer.I similarity index 100% rename from panda/src/pgraph/sceneGraphAnalyzer.I rename to panda/src/pgraphnodes/sceneGraphAnalyzer.I diff --git a/panda/src/pgraph/sceneGraphAnalyzer.cxx b/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx similarity index 100% rename from panda/src/pgraph/sceneGraphAnalyzer.cxx rename to panda/src/pgraphnodes/sceneGraphAnalyzer.cxx diff --git a/panda/src/pgraph/sceneGraphAnalyzer.h b/panda/src/pgraphnodes/sceneGraphAnalyzer.h similarity index 98% rename from panda/src/pgraph/sceneGraphAnalyzer.h rename to panda/src/pgraphnodes/sceneGraphAnalyzer.h index 9f1df9f6fc..980e5e0d60 100644 --- a/panda/src/pgraph/sceneGraphAnalyzer.h +++ b/panda/src/pgraphnodes/sceneGraphAnalyzer.h @@ -36,7 +36,7 @@ class Texture; // Description : A handy class that can scrub over a scene graph and // collect interesting statistics on it. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_PGRAPH SceneGraphAnalyzer { +class EXPCL_PANDA_PGRAPHNODES SceneGraphAnalyzer { PUBLISHED: SceneGraphAnalyzer(); ~SceneGraphAnalyzer(); diff --git a/panda/src/pipeline/thread.cxx b/panda/src/pipeline/thread.cxx index bfea154ec6..aeb56867b2 100644 --- a/panda/src/pipeline/thread.cxx +++ b/panda/src/pipeline/thread.cxx @@ -222,6 +222,12 @@ write_status(ostream &out) { // joinable should be set true if you intend to call // join() to wait for the thread to terminate, or false // if you don't care and you will never call join(). +// Note that the reference count on the Thread object is +// incremented while the thread itself is running, so if +// you just want to fire and forget a thread, you may +// pass joinable = false, and never store the Thread +// object. It will automatically destruct itself when +// it finishes. // // The return value is true if the thread is // successfully started, false otherwise.