# HG changeset patch # User Pantxo Diribarne # Date 1428348793 -7200 # Node ID 42c3a08293245811e022cad481d23034f3895e55 # Parent 490ae1d98f27bae794a7d3776220915123d21258 Skip z axes rendering when in 2D mode (bug #44752) * gl-render.cc (opengl_renderer::draw_axes_boxes): skip z axes rendering when in 2D mode diff -r 490ae1d98f27 -r 42c3a0829324 libinterp/corefcn/gl-render.cc --- a/libinterp/corefcn/gl-render.cc Mon Apr 06 20:48:23 2015 +0100 +++ b/libinterp/corefcn/gl-render.cc Mon Apr 06 21:33:13 2015 +0200 @@ -972,37 +972,40 @@ } // Z box - set_color (props.get_zcolor_rgb ()); - - if (xySym) - { - glVertex3d (xPlaneN, yPlane, zPlaneN); - glVertex3d (xPlaneN, yPlane, zPlane); - } - else + if (! is2d) { - glVertex3d (xPlane, yPlaneN, zPlaneN); - glVertex3d (xPlane, yPlaneN, zPlane); - } - - if (props.is_box ()) - { - glVertex3d (xPlane, yPlane, zPlaneN); - glVertex3d (xPlane, yPlane, zPlane); + set_color (props.get_zcolor_rgb ()); if (xySym) { + glVertex3d (xPlaneN, yPlane, zPlaneN); + glVertex3d (xPlaneN, yPlane, zPlane); + } + else + { glVertex3d (xPlane, yPlaneN, zPlaneN); glVertex3d (xPlane, yPlaneN, zPlane); } - else + + if (props.is_box ()) { - glVertex3d (xPlaneN, yPlane, zPlaneN); - glVertex3d (xPlaneN, yPlane, zPlane); + glVertex3d (xPlane, yPlane, zPlaneN); + glVertex3d (xPlane, yPlane, zPlane); + + if (xySym) + { + glVertex3d (xPlane, yPlaneN, zPlaneN); + glVertex3d (xPlane, yPlaneN, zPlane); + } + else + { + glVertex3d (xPlaneN, yPlane, zPlaneN); + glVertex3d (xPlaneN, yPlane, zPlane); + } + + glVertex3d (xPlaneN, yPlaneN, zPlaneN); + glVertex3d (xPlaneN, yPlaneN, zPlane); } - - glVertex3d (xPlaneN, yPlaneN, zPlaneN); - glVertex3d (xPlaneN, yPlaneN, zPlane); } glEnd ();