소스 검색

*** empty log message ***

David Rose 25 년 전
부모
커밋
edd21b3f4e
3개의 변경된 파일12개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 2
      panda/src/text/config_text.cxx
  2. 5 3
      panda/src/text/config_text.h
  3. 5 3
      panda/src/text/textNode.cxx

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

@@ -9,10 +9,10 @@
 #include <dconfig.h>
 
 Configure(config_text);
-
-NotifyCategory &text_cat = *Notify::ptr()->get_category(":text");
+NotifyCategoryDef(text, "");
 
 ConfigureFn(config_text) {
   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
 
 #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

+ 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,
   // 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);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////