comparison libinterp/corefcn/gl2ps-renderer.h @ 21198:1adcdc518d9e

provide wrapper for glFinish in opengl_renderer class * gl-render.h, gl-render.cc (opengl_renderer::finish): New function. * gl2ps-renderer.h, gl2ps-renderer.cc, __osmesa_print__.cc: Use it instead of calling glFinish directly.
author John W. Eaton <jwe@octave.org>
date Thu, 04 Feb 2016 18:12:00 -0500
parents 9a5bb6996b16
children
comparison
equal deleted inserted replaced
21197:9a5bb6996b16 21198:1adcdc518d9e
56 // Initialize a sorting tree (viewport) in gl2ps for each axes 56 // Initialize a sorting tree (viewport) in gl2ps for each axes
57 GLint vp[4]; 57 GLint vp[4];
58 glGetIntegerv (GL_VIEWPORT, vp); 58 glGetIntegerv (GL_VIEWPORT, vp);
59 gl2psBeginViewport (vp); 59 gl2psBeginViewport (vp);
60 60
61 // Draw and glFinish () or there may primitives missing in the 61 // Draw and finish () or there may primitives missing in the
62 // gl2ps output. 62 // gl2ps output.
63 opengl_renderer::draw_axes (props); 63 opengl_renderer::draw_axes (props);
64 glFinish (); 64 finish ();
65 65
66 // Finalize viewport 66 // Finalize viewport
67 GLint state = gl2psEndViewport (); 67 GLint state = gl2psEndViewport ();
68 if (state == GL2PS_NO_FEEDBACK) 68 if (state == GL2PS_NO_FEEDBACK)
69 warning ("gl2ps_renderer::draw_axes: empty feedback buffer and/or nothing else to print"); 69 warning ("gl2ps_renderer::draw_axes: empty feedback buffer and/or nothing else to print");