<div>I wasn't aware of hidden X servers and virtual framebuffers, but I just tried this with Xvfb and it seems to work for my purposes. Thanks, David! </div>
<div><br><br> </div>
<div class="gmail_quote">2010/10/19 David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Mark,<br><br>I'm jumping into this conversation a little late, so I might have<br>missed a couple things. But it seems that you are going to need to<br>
connect to an X server of some sort, so you should try using a hidden<br>X server, rather than just a hidden window.<br><br>Since I have only one monitor on my computer, but have a dual-head<br>video card, I use my second head (with no monitor attached) for<br>
running VTK dashboard tests or other graphics-related things that I<br>don't want to see on-screen. It seems to me that you could do<br>something similar, and when you log-in remotely you could set your<br>DISPLAY variable to use a hidden, hardware-accelerated X server.<br>
<br> David<br><br>On Tue, Oct 19, 2010 at 5:39 AM, endlosschleife1<br>
<div>
<div></div>
<div class="h5"><<a href="mailto:endlosschleife1@googlemail.com">endlosschleife1@googlemail.com</a>> wrote:<br>> Hi Lars,<br>><br>> sorry for the late reply. Thanks a lot! I just tried this out. It does seem<br>
> to not open the X Window, but I still need a X connection, otherwise my code<br>> terminates when it calls the GetDesiredVisualInfo() method. For my purposes<br>> I would need a VTK based rendering service that I can interact with remotely<br>
> (starting it from a SSH terminal, sending rendered data to a client through<br>> a socket etc.). I will look into this some more. I wonder if I can hardcode<br>> all the information that the render window needs and tries to retrieve from<br>
> the display.<br>><br>> Thanks again!<br>><br>> Mark<br>><br>><br>> 2010/10/3 Lars Friedrich Lars <<a href="mailto:lars-friedrich@gmx.net">lars-friedrich@gmx.net</a>><br>>><br>>> Hello Mark,<br>
>><br>>><br>>> I'm having a comparable problem. I found a solution that works for me,<br>>> maybe this is also a solution to your situation ...<br>>><br>>> Basically, I want to hide the X-window when using GL hardware off-screen<br>
>> rendering. My first experiments involved XUnmapWindow - however, as the X<br>>> window is initially mapped in the CreateAWindow()-method, the window will<br>>> appear at least for a few milliseconds prior to calling XUnmapWindow(). This<br>
>> is neither "nice", nor a solution to your problem.<br>>><br>>> Therefore, I inherited from vtkXOpenGLRenderWindow and overrode the<br>>> CreateAWindow()-method. I simply eliminated the code block that calls<br>
>> XMapWindow() initially -> the off-screen window never gets mapped ...<br>>><br>>> The inherited class is however suboptimal, as I had to redefine the<br>>> vtkXOpenGLRenderWindowInternal class (forward declaration ...).<br>
>><br>>> I attachted a simple example (hidex.cxx) that makes use of the simple<br>>> inherited class. If you want, try it, and please let me know whether or not<br>>> it works for you.<br>>><br>
>><br>>> regards,<br>>><br>>> lars<br>>><br>>><br>>><br>>><br>>> -------- Original-Nachricht --------<br>>> > Datum: Thu, 23 Sep 2010 10:54:54 -0400<br>>> > Von: Aashish Chaudhary <<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>><br>
>> > An: endlosschleife1 <<a href="mailto:endlosschleife1@googlemail.com">endlosschleife1@googlemail.com</a>><br>>> > CC: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>>> > Betreff: Re: [vtkusers] Offscreen Rendering & Linux<br>
>><br>>> > Mark,<br>>> ><br>>> > I believe that as of now if you want to use OpenGL driver and not Mesa<br>>> > it<br>>> > requires opening an windows or else you have to use Mesa (like you did).<br>
>> > There is no workaround for the former case.<br>>> ><br>>> > On Thu, Sep 23, 2010 at 6:48 AM, endlosschleife1 <<br>>> > <a href="mailto:endlosschleife1@googlemail.com">endlosschleife1@googlemail.com</a>> wrote:<br>
>> ><br>>> > > Hello,<br>>> > ><br>>> > > has anybody some experience with doing offscreen rendering under Linux<br>>> > with<br>>> > > graphics acceleration support and give me some hints on how to get<br>
>> > > this<br>>> > to<br>>> > > work?<br>>> > ><br>>> > > I'm using a vtkOpenGLRenderWindow and set OffScreenRendering to on.<br>>> > > With<br>>> > > that it does really not render into a window, but VTK still opens an X<br>
>> > > Window (apparently it needs its handle). So for instance when I try to<br>>> > start<br>>> > > a VTK based app remotely via SSH I get the following error message:<br>>> > ><br>
>> > > # An unexpected error has been detected by Java Runtime Environment:<br>>> > > #<br>>> > > # SIGSEGV (0xb) at pc=0xb2b5b4f5, pid=16472, tid=3044047776<br>>> > > #<br>
>> > > # Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)<br>>> > > # Problematic frame:<br>>> > > # C [libvtkRenderingJava.so.5.6.0+0x66c4f5]<br>>> > > _ZN22vtkXOpenGLRenderWindow13CreateAWindowEv+0x37b<br>
>> > > #<br>>> > > # An error report file with more information is saved as<br>>> > > hs_err_pid16472.log<br>>> > > #<br>>> > > # If you would like to submit a bug report, please visit:<br>
>> > > # <a href="http://java.sun.com/webapps/bugreport/crash.jsp" target="_blank">http://java.sun.com/webapps/bugreport/crash.jsp</a><br>>> > > #<br>>> > ><br>>> > > Is there any way around the need for VTK to open an X window?<br>
>> > > Basically<br>>> > I<br>>> > > would like to know if that problem is even fixable or if I need to<br>>> > > look<br>>> > for<br>>> > > other workarounds.<br>
>> > ><br>>> > > When I build VTK with MESA enabled it works, but the performance<br>>> > > without<br>>> > > accelaration is unacceptable.<br>>> > ><br>>> > > Thanks,<br>
>> > > Mark<br>>> > > _______________________________________________<br>>> > > Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>>> > ><br>
>> > > Visit other Kitware open-source projects at<br>>> > > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>>> > ><br>
>> > > Please keep messages on-topic and check the VTK FAQ at:<br>>> > > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>>> > ><br>>> > > Follow this link to subscribe/unsubscribe:<br>
>> > > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>>> > ><br>>> > ><br>>> ><br>>> ><br>>> > --<br>
>> > | Aashish Chaudhary<br>>> > | R&D Engineer<br>>> > | Kitware Inc.<br>>> > | <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>>><br>>> --<br>
>> GRATIS: Spider-Man 1-3 sowie 300 weitere Videos!<br>>> Jetzt freischalten! <a href="http://portal.gmx.net/de/go/maxdome" target="_blank">http://portal.gmx.net/de/go/maxdome</a><br>><br>><br>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at<br>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the VTK FAQ at:<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br></div></div></blockquote></div><br>