Mercurial > octave-nkf
comparison scripts/plot/util/private/__opengl_print__.m @ 19741:59ad278cfb98
__opengl_print__.m: Use OSMesa for offscreen rendering (Bug #33180)
* __opengl_print__.m: Call __osmesa_print__ if figure is invisible
* __osmesa_print__.cc: Add method to create process and pipe gl2ps
output to it for compatibility with __opengl_print__ and drawnow.
* NEWS: Mention offscreen rendering
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Fri, 13 Feb 2015 17:24:38 +0100 |
parents | 4197fc428c7d |
children | 9fc020886ae9 |
comparison
equal
deleted
inserted
replaced
19740:18fd412c7dc3 | 19741:59ad278cfb98 |
---|---|
160 | 160 |
161 for n = 1:numel (pipeline) | 161 for n = 1:numel (pipeline) |
162 if (opts.debug) | 162 if (opts.debug) |
163 fprintf ("opengl-pipeline: '%s'\n", pipeline{n}); | 163 fprintf ("opengl-pipeline: '%s'\n", pipeline{n}); |
164 endif | 164 endif |
165 drawnow (gl2ps_device{n}, strcat ('|',pipeline{n})); | 165 |
166 if (strcmp (get (opts.figure, "visible"), "on")) | |
167 ## Use toolkits "print_figure" method | |
168 drawnow (gl2ps_device{n}, strcat ('|', pipeline{n})); | |
169 else | |
170 ## Use OpenGL offscreen rendering with OSMesa | |
171 __osmesa_print__ (opts.figure, strcat ('|', pipeline{n}), gl2ps_device{n}); | |
172 endif | |
166 endfor | 173 endfor |
167 | 174 |
168 if (! isempty (strfind (opts.devopt, "standalone"))) | 175 if (! isempty (strfind (opts.devopt, "standalone"))) |
169 opts.latex_standalone (opts); | 176 opts.latex_standalone (opts); |
170 endif | 177 endif |