reset_if_new should return true or false

This commit is contained in:
David Rose 2004-02-10 05:57:03 +00:00
parent 92cdcf764b
commit 99b64bdfc6
2 changed files with 6 additions and 3 deletions

View File

@ -128,13 +128,16 @@ clear(DisplayRegion *dr) {
// Function: GraphicsStateGuardian::reset_if_new // Function: GraphicsStateGuardian::reset_if_new
// Access: Public // Access: Public
// Description: Calls reset() to initialize the GSG, but only if it // Description: Calls reset() to initialize the GSG, but only if it
// hasn't been called yet. // hasn't been called yet. Returns true if the GSG was
// new, false otherwise.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE void GraphicsStateGuardian:: INLINE bool GraphicsStateGuardian::
reset_if_new() { reset_if_new() {
if (_needs_reset) { if (_needs_reset) {
reset(); reset();
return true;
} }
return false;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -126,7 +126,7 @@ public:
virtual CPT(RenderState) begin_decal_base_second(); virtual CPT(RenderState) begin_decal_base_second();
virtual void finish_decal(); virtual void finish_decal();
INLINE void reset_if_new(); INLINE bool reset_if_new();
virtual void reset(); virtual void reset();
INLINE void modify_state(const RenderState *state); INLINE void modify_state(const RenderState *state);