[vtkusers] Offscreen rendering bug

John Norris jnorris at mcs.anl.gov
Fri Apr 18 12:08:57 EDT 2008


Is VTK_NO_EXTENSION_LOADING defined in 
Rendering/vtkOpenGLExtensionManagerConfigure.h ?  That would also avoid 
the error.

Francois Bertel wrote:
> No. I'm using Linux gentoo x86 and I turned off the Xserver before 
> testing and I tested that the DISPLAY environment variable is not set.
> 
> John Norris wrote:
>> Two guesses off of the top of my head:
>>
>> Less likely: VTK_USE_X is turned off (possible if you've compiled 
>> under OS X or cygwin).
>>
>> More likely: your test program is not crashing because it successfully 
>> connects to an X server.  Unset DISPLAY and try again.
>>
>> Thanks,
>> John
>>
>> Francois Bertel wrote:
>>> So I cannot reproduce what you said.
>>>
>>> I tried compiling VTK against Mesa with VTK_OPENGL_HAS_OSMESA  to OFF 
>>> and it crashes.
>>>
>>> But if I set VTK_OPENGL_HAS_OSMESA to ON, it does not crash.
>>>
>>> John Norris wrote:
>>>> Yes, that's right.  I was trying to explain that I was using only 
>>>> Mesa (including OSMesa) and not OpenGL + MangledMesa.  Sorry I 
>>>> didn't make that clearer.
>>>>
>>>> John
>>>>
>>>> Francois Bertel wrote:
>>>>> Hi John,
>>>>>
>>>>> By including OSMesa, do you really mean you set 
>>>>> VTK_OPENGL_HAS_OSMESA to ON?
>>>>>
>>>>> John Norris wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I've compiled VTK (from CVS) using Mesa-7.0.3 (including OSMesa) on a
>>>>>> x86_64 linux system.  I've called
>>>>>> vtkGraphicsFactory::SetOffScreenOnlyMode(1)
>>>>>> before creating any of the rendering classes.  I've also called
>>>>>> OffScreenRenderingOn() from my render window before doing anything 
>>>>>> else
>>>>>> with it.  Still, VTK tries to contact the X server, causing a 
>>>>>> crash.  It
>>>>>> seems to be happening after line 496 in vtkOpenGLExtensionManager, in
>>>>>> the #ifdef VTK_USE_X block.  The call to
>>>>>> this->RenderWindow->GetGenericDisplayId() leads to a call to
>>>>>> XOpenDisplay(); XOpenDisplay() is explicitly called just a few lines
>>>>>> later, but my program doesn't get that far.
>>>>>>
>>>>>> Perhaps the return value of 
>>>>>> vtkGraphicsFactory::GetOffScreenOnlyMode()
>>>>>> or this->RenderWindow->GetOffScreenRendering() should be checked 
>>>>>> first.
>>>>>>
>>>>>> Thanks,
>>>>>> John
>>>>>
>>>>>
>>>>
>>>
>>>
>>
> 
> 

-- 
John Norris
Scientific Visualization Developer
Center for Astrophysical Thermonuclear Flashes
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.cxx
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080418/3ff650c2/attachment.asc>


More information about the vtkusers mailing list