octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do we really need to replace gnuplot?


From: Shai Ayal
Subject: Re: Do we really need to replace gnuplot?
Date: Wed, 17 Oct 2007 22:31:19 +0200

On 10/17/07, kahacjde <address@hidden> wrote:
>
>
> Shai Ayal-2 wrote:
> >
> > On 10/15/07, Alexander Barth <address@hidden> wrote:
> >>
> >>
> >> On 10/15/07, Shai Ayal <address@hidden> wrote:
> >> > On 10/15/07, John W. Eaton <address@hidden> wrote:
> >> > > On 15-Oct-2007, Shai Ayal wrote:
> >> > >
> >> > > | But are you willing to sacrifce offscreen rendering for them?
> >> > >
> >> > > Precisely what do you mean by offscreen rendering?
> >> >
> >> > I mean the ability to produce a plot in a file (e.g ps or png) w/o the
> >> > need for opening a window or indeed using any graphical capabilities
> >> > in the computer. gnuplot does this easily, However OpenGL is meant for
> >> > screen rendering, so even if you wish to produce a png file, you must
> >> > first render the scene to the screen and then convert it to a png
> >> > file.
> >> >
> >> > There might be a solution for this using OpenGL pbuffers. I'm looking
> >> into
> >> it ..
> >> >
> >> > Shai
> >>
> >>
> >>
> >> You can do off-screen rendering in opengl with GLX Pixmap and OS Mesa.
> >> For GLX Pixmap you need a connection to a X server but no window is
> >> displayed. This is not necessary for OS Mesa. A nice overview can be
> >> found
> >> here:
> >>
> >> http://www.mesa3d.org/brianp/sig97/offscrn.htm
> >>
> >> Also, toolkits such as GTK (gtkglext) provide a higher level interface
> >> for
> >> off-screen pixmaps.
> >> http://gtkglext.sourceforge.net/reference/gtkglext/gtkglext-gdkglpixmap.html
> >>
> >> The advantage of using a toolkit for off-screen rendering is that your
> >> code
> >> is probably more portable.
> > It looks to me like gtkglext does require a connection to an x-server,
> > which I don't think we should require of windows and mac users.
> > osmesa seems like the way to go, but I must ascertain that it exists
> > for windows and mac before I commit
> >
> > thanks for the tips
> > Shai
> >
> >>
> >> Alex
> >>
> >>
> >>
> >
> >
>
> In addtion it could be interesting to have look at the method used in
> OpenInventor/Coin3D. They provide a SoOffscreenRenderer Class that allows
> for off-screen rendering with RGB and Postscript support.
>
> To cite the relevant part:
> "Offscreen rendering is internally done through either a GLX offscreen
> context (i.e. OpenGL on X11) or a WGL (i.e. OpenGL on Win32) or AGL (i.e.
> OpenGL on the Mac OS) ditto. If the OpenGL driver supports the pbuffer
> extension, it is detected and used to provide hardware-accelerated offscreen
> rendering."
>
> http://doc.coin3d.org/Coin/classSoOffscreenRenderer.html
>
> Kai

I think it is better to use osmesa for offscreen rendering, the
advantage being that it is cross-platform (in the homepage it talks
about unix & windows, and I think OSX is also supported) and does not
require an x-server to run on linux. What I have in mind is running
octave scripts on a powerful unix server which has no screen attached.
Using the GLX/WGL/AGL solution you describe would require a x-server
to be running.
The disadvantage is that we loose hardware acceleration for offscreen
rendering. However we will still use the system's OpenGL for onscreen
rendering so all the interactive stuff will benefit from hardware
acceleration.

Shai


reply via email to

[Prev in Thread] Current Thread [Next in Thread]