From dc7c34db3372286ef26cb7204779ac0b0b13e8f6 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 27 Sep 2005 20:19:30 +0000 Subject: [PATCH] fix texture state cleanup between scenes --- panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx | 2 +- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index 04c7bae744..65c0edfaec 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -2341,7 +2341,7 @@ do_issue_texture() { DO_PSTATS_STUFF(_texture_state_pcollector.add_level(1)); int num_stages = _target._texture->get_num_on_stages(); - int num_old_stages = 0; + int num_old_stages = _max_texture_stages; if (_state._texture != (TextureAttrib *)NULL) { num_old_stages = _state._texture->get_num_on_stages(); } diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index daea983f6a..c7e43c4515 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -5034,7 +5034,7 @@ do_issue_texture() { DO_PSTATS_STUFF(_texture_state_pcollector.add_level(1)); int num_stages = _target._texture->get_num_on_stages(); - int num_old_stages = 0; + int num_old_stages = _max_texture_stages; if (_state._texture != (TextureAttrib *)NULL) { num_old_stages = _state._texture->get_num_on_stages(); }