[vtkusers] Offscreen rendering

John Norris jnorris at mcs.anl.gov
Thu Apr 13 13:20:46 EDT 2006


There's something I'm missing when I compile the MesaGL libs, whether 
mangled or not.  In both cases, the osdemo doesn't work properly.  The 
generated tga file is just a black square.  So it isn't really 
surprising that VTK with Mesa or MangledMesa doesn't render offscreen 
properly.  I've done some googling on this but haven't found anything 
helpful.

If I compile only libOSMesa, then the osdemo works.  This is with Mesa 
6.5 on AIX 5.3 (I copied and edited linux-osmesa16, as per the README). 
  With the OSMesa build and the system OpenGL libs, I can compile VTK 
and VTK programs.  In this case, I'm /not/ using mangling (since I'm not 
compiling MesaGL or MesaGLU), and I don't have VTK_USE_MANGLED_MESA 
turned on.  I have turned on VTK_OPENGL_HAS_OSMESA and have properly 
defined OSMESA_INCLUDE_DIR and OSMESA_LIBRARY.  The GL-related options 
point to the system OpenGL stuff.

I would prefer to be able to compile only OSMesa, since I'll use the 
system OpenGL libs for everything except offscreen rendering.  But at 
this point I'll take anything that works.

John

Randall Hand wrote:
> I've been using VTK Offscreen for a little over a year now and haven't 
> had too much trouble with it.  I use MAngled Mesa & VTK on x-less 
> systems all the time.
> 
> 1) Did you properly compile Mesa with the -DUSE_MGL_NAMESPACE and other 
> options enabled?
> 2) Did you enable VTK_USE_MANGLED_MESA in VTK?
> 3) Did you specify the correct Mesa libraries & include files?
> 4) What version of VTK & Mesa are you using?
> 
> On 4/13/06, *Kevin H. Hobbs* <kevin.hobbs.1 at ohiou.edu 
> <mailto:kevin.hobbs.1 at ohiou.edu>> wrote:
> 
> On Thu, 2006-04-13 at 09:07 -0500, John Norris wrote:
> > Progress!  I can render offscreen, but it still requires a connection to
> > an X server.  This is despite the fact that I'm setting
> > vtkGraphicsFactory::OffScreenOnlyMode to 1.  Either it's not working as
> > advertised (the program still makes X calls), or there's some CMake
> > option that I need to set.
> >
> > Is there any possible way to render offscreen in Unix without connecting
> > to an X server?
> >
> > This is with straight OpenGL, no Mesa.  I could never get that to work
> > at all.
> >
> > John
> 
> I'm very interested in what you discover. I've tried for a while to do
> this and failed.  I used the system OpenGL only, Mesa only, and system
> OpenGL + mangled Mesa, without success.
> 
> I know I'm missing something.

-- 
John Norris
Research Programmer
Center for Simulation of Advanced Rockets
http://www.uiuc.edu/ph/www/jnorris



More information about the vtkusers mailing list