From 0c6e867d50a75aae2cc1baf228e4cc2609ce79ca Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 16 May 2002 18:23:07 +0000 Subject: [PATCH] a bit more debugging --- panda/src/display/graphicsStateGuardian.I | 12 ++++++++++++ panda/src/display/graphicsStateGuardian.cxx | 6 +++--- panda/src/display/graphicsStateGuardian.h | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 8d858e6bb2..bed3f686bb 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -74,6 +74,12 @@ get_scene() const { //////////////////////////////////////////////////////////////////// INLINE void GraphicsStateGuardian:: modify_state(const RenderState *state) { +#ifndef NDEBUG + if (gsg_cat.is_spam()) { + gsg_cat.spam() << "Modifying GSG state with:\n"; + state->write(gsg_cat.spam(false), 2); + } +#endif _state = _state->issue_delta_modify(state, this); } @@ -91,6 +97,12 @@ modify_state(const RenderState *state) { //////////////////////////////////////////////////////////////////// INLINE void GraphicsStateGuardian:: set_state(const RenderState *state) { +#ifndef NDEBUG + if (gsg_cat.is_spam()) { + gsg_cat.spam() << "Setting GSG state to:\n"; + state->write(gsg_cat.spam(false), 2); + } +#endif _state = _state->issue_delta_set(state, this); } diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index bc58609255..626ba5b1d2 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -859,7 +859,7 @@ issue_light(const LightAttrib *attrib) { light->bind(this, cur_light_id); } else if (cur_light_id == -1) { - display_cat.warning() + gsg_cat.warning() << "Failed to bind " << *light << " to id.\n"; } } @@ -1358,11 +1358,11 @@ read_priorities(void) { ConfigString type_name = (*i).Val(); TypeHandle type = TypeRegistry::ptr()->find_type(type_name); if (type == TypeHandle::none()) { - display_cat.warning() + gsg_cat.warning() << "Unknown type requested for GSG preference: " << type_name << "\n"; } else { - display_cat.debug() + gsg_cat.debug() << "Specifying type " << type << " for GSG preference.\n"; factory.add_preferred(type); } diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 72be0fe880..f5cb5af889 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -38,6 +38,7 @@ #include "colorWriteAttrib.h" #include "colorBlendAttrib.h" #include "transparencyAttrib.h" +#include "config_display.h" #include "notify.h" #include "pvector.h"