[vtkusers] VTK on two graphics cards?
David Gobbi
david.gobbi at gmail.com
Fri Nov 19 09:05:53 EST 2010
You can use vtkRenderWindow::FullScreenOn(), assuming you have a
"naked" RenderWindow. If you are using the render window in a GUI
toolkit like Qt, though, you would need to use Qt to make the window
fullscreen.
To get the position/size of the window you can use
GetPosition()/GetSize(). Not sure if GetPosition() is 100% reliable.
If you do need to have a separate RenderWindow on each screen, you can
set up the Renderers so that the two views merge together into a
single view, I think that vtkRenderer::SetCenter() can be used to set
the perspective "center" to right edge of your left screen and to the
left edge of your right screen so that the perspectives will match.
Unfortunately I can't find the VTK test that shows how to this, but
I'm sure that I remember there being one. But if you do this, then
you can add the same actors to each renderer and synchronize the
cameras in order make them render a single scene together.
David
On Fri, Nov 19, 2010 at 6:41 AM, Samson Timoner <Samson at bwh.harvard.edu> wrote:
> Thanks for your help David.
>
> One other question: If I instead wanted to open up two vtk OpenGL windows,
> one covering the entirety of each graphics card, is there a command to tell
> vtk to be full screen on one graphics card?
>
> If not, might you happen to know how can I can query X to get the
> coordinates for a particular monitor/graphics card?
>
> Thanks!
>
> -- Samson
>
>
> For NVidia cards, all you have to do is set up TwinView in a
> side-by-side configuration. Use nvidia-settings to do this (you can
> run it from the command-line or select it from the menu).
>
> For other cards, you might be out of luck. You can use Xinerama to
> make your linux desktop span both monitors, but hardware OpenGL
> acceleration might not work in this configuration. You might have to
> use non-accelerated OpenGL instead, and the way this is done will vary
> from system to system (on Ubuntu 10.04 the non-accelerated OpenGL is
> kept in /usr/lib/mesa).
>
> David
>
> On Thu, Nov 18, 2010 at 10:25 AM, Samson Timoner <Samson at bwh.harvard.edu>
> wrote:
>> I'm wondering what VTK's support is for a two graphics card setup. I have
>> a
>> two graphics card system on linux, each with one monitor.
>>
>> Can I open a single VTK OpenGL render window across both monitors?
>>
>> Thanks,
>>
>> -- Samson
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list