[vtk-developers] GLXPixmap vs OSMesa

Moreland, Kenneth kmorel at sandia.gov
Thu Mar 10 17:20:30 EST 2005


Jeff,

I like the idea of the UseOffScreenRendering flag working without Mesa.
However, we also often use Mesa builds on clusters that do not have an X
host running.  I think using GLXPixmap still requires a connection to an
X host.  Thus if you stripped out the Mesa stuff, our applications may
cease to work.  Could you implement this such that if you build with
Mesa you use Mesa offscreen rendering and otherwise use a GLXPixmap?

-Ken

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********  
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      fax:   (505) 845-0833


> -----Original Message-----
> From: vtk-developers-bounces at vtk.org 
> [mailto:vtk-developers-bounces at vtk.org] On Behalf Of Jeff Lee
> Sent: Thursday, March 10, 2005 3:02 PM
> To: vtk-developers
> Subject: [vtk-developers] GLXPixmap vs OSMesa
> 
> Hi All,
> I have been tooling around with glpixap for offscreen 
> rendering.  I started with vtkXOpenGLRenderWindow and managed 
> to strip out the osmesa stuff and replace its implementation 
> with rendering to a glxpixmap instead (a'la John Schalf and 
> Glenn Lehmann).  All of this works great, all I have to do is 
> call SetOffScreenRendering(1) on the renderWindow, and then I 
> can dump the image to a file.  Eventually I can have it such 
> that switching between onscreen/offscreen will work similar 
> to windows.  
> I can also see a pbuffer implementation as a straightforward 
> extension of this.
> 
> The question is, can anyone see any major drawbacks of 
> dropping osmesa for this approach?  The benefits that I can see are;
> 
>    1. No more mangled mesa, this approach (glxPixmap)  works both in
>       mesa and in hardware drivers.
>    2. We can stop tiling the display to get high-resolution images.
>    3. Similar behavior to that of vtkWin32OpenGLRenderWindow.
>    4. Can further extend to hardware-accelerated pbuffers with drivers
>       that support it.
> 
> Possible Drawbacks:
> 
>    1. Perhaps not everyone has a driver which supports glx1.3.
>    2. glxpixmap is slow (not when compared to osmesa).
> 
> I would like to eventually replace what's in 
> vtkXOpenGLRenderWindow with glxpixmap.  Does anyone have 
> other arguments which I am perhaps not seeing, or reasons for 
> not doing this?  Thanks in advance.
> Regards,
> Jeff
> 
> --
> Jeff Lee
> Senior Software Engineer
> Computational Dynamics North America Ltd
> 21 Lafayette Street, Suite 230
> Lebanon NH 03766 USA
> fax:   603 643 9994
> phone: 603 643 9993 x109
> http://www.cd-adapco.com
> 
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
> 
> 




More information about the vtk-developers mailing list