Pārlūkot izejas kodu

*** empty log message ***

David Rose 25 gadi atpakaļ
vecāks
revīzija
edd21b3f4e

+ 2 - 2
panda/src/text/config_text.cxx

@@ -9,10 +9,10 @@
 #include <dconfig.h>
 #include <dconfig.h>
 
 
 Configure(config_text);
 Configure(config_text);
-
-NotifyCategory &text_cat = *Notify::ptr()->get_category(":text");
+NotifyCategoryDef(text, "");
 
 
 ConfigureFn(config_text) {
 ConfigureFn(config_text) {
   TextNode::init_type();
   TextNode::init_type();
 }
 }
 
 
+const bool flatten_text = config_text.GetBool("flatten-text", true);

+ 5 - 3
panda/src/text/config_text.h

@@ -7,10 +7,12 @@
 #define CONFIG_TEXT_H
 #define CONFIG_TEXT_H
 
 
 #include <pandabase.h>
 #include <pandabase.h>
-#include <notify.h>
+#include <notifyCategoryProxy.h>
 
 
-// Configure variables for text package.
+class DSearchPath;
 
 
-extern NotifyCategory &text_cat;
+NotifyCategoryDecl(text, EXPCL_PANDA, EXPTP_PANDA);
+
+extern const bool flatten_text;
 
 
 #endif
 #endif

+ 5 - 3
panda/src/text/textNode.cxx

@@ -469,9 +469,11 @@ rebuild() {
   // Now flatten our hierarchy to get rid of the transforms we put in,
   // Now flatten our hierarchy to get rid of the transforms we put in,
   // applying them to the vertices.
   // applying them to the vertices.
 
 
-  SceneGraphReducer gr(RenderRelation::get_class_type());
-  gr.apply_transitions(_root);
-  gr.flatten(_root, true);
+  if (flatten_text) {
+    SceneGraphReducer gr(RenderRelation::get_class_type());
+    gr.apply_transitions(_root);
+    gr.flatten(_root, true);
+  }
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////