diff src/gl-render.cc @ 11026:811d8f113423

reverse order in which child objects are processed in OpenGL renderer
author John W. Eaton <jwe@octave.org>
date Mon, 27 Sep 2010 02:51:20 -0400
parents f56255a2b890
children d748acc75658
line wrap: on
line diff
--- a/src/gl-render.cc
+++ b/src/gl-render.cc
@@ -1631,7 +1631,10 @@
 
   // 1st pass: draw light objects
 
-  for (int i = 0; i < children.numel (); i++)
+  // Start with the last element of the array of child objects to
+  // display them in the oder they were added to the array.
+
+  for (octave_idx_type i = children.numel () - 1; i >= 0; i--)
     {
       graphics_object go = gh_manager::get_object (children (i));