Browse Source

Don't use vector iterator in draw_bins, to allow buffer creation during the draw traversal

rdb 16 years ago
parent
commit
38385867ee
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panda/src/display/graphicsEngine.cxx

+ 3 - 3
panda/src/display/graphicsEngine.cxx

@@ -1414,9 +1414,9 @@ void GraphicsEngine::
 draw_bins(const GraphicsEngine::Windows &wlist, Thread *current_thread) {
 draw_bins(const GraphicsEngine::Windows &wlist, Thread *current_thread) {
   nassertv(wlist.verify_list());
   nassertv(wlist.verify_list());
 
 
-  Windows::const_iterator wi;
-  for (wi = wlist.begin(); wi != wlist.end(); ++wi) {
-    GraphicsOutput *win = (*wi);
+  size_t wlist_size = wlist.size();
+  for (size_t wi = 0; wi < wlist_size; ++wi) {
+    GraphicsOutput *win = wlist[wi];
     if (win->is_active() && win->get_gsg()->is_active()) {
     if (win->is_active() && win->get_gsg()->is_active()) {
       if (win->flip_ready()) {
       if (win->flip_ready()) {
         {
         {