Mercurial > hg > octave-nkf
diff libinterp/corefcn/gl-render.cc @ 20244:42c3a0829324
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
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 06 Apr 2015 21:33:13 +0200 |
parents | 2eed41ae3b64 |
children | 438485f6a479 |
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc +++ b/libinterp/corefcn/gl-render.cc @@ -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 ();