From edd21b3f4e6fda6a4e6a93932aabe4cf46a62ab6 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 7 Nov 2000 01:30:26 +0000 Subject: [PATCH] *** empty log message *** --- panda/src/text/config_text.cxx | 4 ++-- panda/src/text/config_text.h | 8 +++++--- panda/src/text/textNode.cxx | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/panda/src/text/config_text.cxx b/panda/src/text/config_text.cxx index 1af2eb2050..795df43b7f 100644 --- a/panda/src/text/config_text.cxx +++ b/panda/src/text/config_text.cxx @@ -9,10 +9,10 @@ #include 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); diff --git a/panda/src/text/config_text.h b/panda/src/text/config_text.h index 4e6c4440bd..45725fdf8d 100644 --- a/panda/src/text/config_text.h +++ b/panda/src/text/config_text.h @@ -7,10 +7,12 @@ #define CONFIG_TEXT_H #include -#include +#include -// Configure variables for text package. +class DSearchPath; -extern NotifyCategory &text_cat; +NotifyCategoryDecl(text, EXPCL_PANDA, EXPTP_PANDA); + +extern const bool flatten_text; #endif diff --git a/panda/src/text/textNode.cxx b/panda/src/text/textNode.cxx index 730e12dc4b..74a438d2fe 100644 --- a/panda/src/text/textNode.cxx +++ b/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); + } } ////////////////////////////////////////////////////////////////////