From da1e8f95b44d4065600ec93c4a89eefeb8c20fa5 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 22 Jun 2005 21:07:42 +0000 Subject: [PATCH] add mark_new --- panda/src/display/graphicsStateGuardian.I | 11 +++++++++++ panda/src/display/graphicsStateGuardian.h | 1 + 2 files changed, 12 insertions(+) diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index ee0e83db99..5ef0b405a7 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -435,6 +435,17 @@ reset_if_new() { return false; } +//////////////////////////////////////////////////////////////////// +// Function: GraphicsStateGuardian::mark_new +// Access: Public +// Description: Marks the GSG as "new", so that the next call to +// reset_if_new() will be effective. +//////////////////////////////////////////////////////////////////// +INLINE void GraphicsStateGuardian:: +mark_new() { + _needs_reset = true; +} + //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::modify_state // Access: Public diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 03eee8476b..a26b09f1e6 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -177,6 +177,7 @@ public: virtual void framebuffer_release_texture(GraphicsOutput *win, Texture *tex); INLINE bool reset_if_new(); + INLINE void mark_new(); virtual void reset(); INLINE void modify_state(const RenderState *state);