diff libinterp/corefcn/gl2ps-print.cc @ 23546:06805aabbdd1

Draw 2D axes primitives in the children stack order (bug #50750) * gl-render.h/cc: (opengl_renderer::draw_axes_grids): new method to group all grids rendering (opengl_renderer::draw_axes): for 2D axes disable DEPTH_TEST. Draw grids before/after primitives depending on the "layer" property * gl2ps-print.cc (gl2ps_renderer::draw): if all axes are 2D disable primitive sorting
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 28 May 2017 14:21:07 +0200
parents 21baad6b35c4
children 80c42f4cca13
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-print.cc	Wed May 31 22:59:46 2017 +0200
+++ b/libinterp/corefcn/gl2ps-print.cc	Sun May 28 14:21:07 2017 +0200
@@ -227,8 +227,10 @@
         GLint gl2ps_sort = GL2PS_BSP_SORT;
 
         // For 2D plots we can use a simpler Z-depth sorting algorithm
+        // FIXME: gl2ps does not provide a way to change the sorting algorythm
+        // on a viewport basis, we thus disable sorting only if all axes are 2D
         if (term.find ("is2D") != std::string::npos)
-          gl2ps_sort = GL2PS_SIMPLE_SORT;
+          gl2ps_sort = GL2PS_NO_SORT;
 
         // Use a temporary file in case an overflow happens
         FILE *tmpf = octave_tmpfile_wrapper ();