[vtkusers] Rendering into pre-existing OpenGL-window without any vtkRenderWi ndow-Instance
John Biddiscombe
jbiddiscombe at skippingmouse.co.uk
Wed May 12 05:53:23 EDT 2004
Your best bet would be to modify vtkRenderWindow (subclasses) to have some
new methods which allow you to pass in a pre-existing window/rendering
context and bypass all the window creation/initialization code. Then you'd
in principle be able to associate an interactor, renderer and all the rest
with it and use it just like any other vtk renderwindow.
JB
----- Original Message -----
From: "Saeger, Marian" <Marian.Saeger at eads.net>
To: <vtkusers at vtk.org>
Sent: Wednesday, May 12, 2004 10:23 AM
Subject: [vtkusers] Rendering into pre-existing OpenGL-window without any
vtkRenderWi ndow-Instance
> Hi!
>
> Similar questions have been raised before, but not exactly this one - and
> existing solutions aren't nailing down my problem.
>
> So I would be thankful, if anyone could give me a hint on this one:
>
> I want vtk to render into a pre-existing OpenGL-window without having to
> create a vtkRenderWindow instance. I.e., I want to use glut to create a
> window and then tell my vtkRenderer-Instance just to render into that
> window.
>
> But for that, I would need a vtkRenderer who doesn't care about a
> RenderWindow and just creates gl-function-calls - unfortunately, as I see
> it, vtkRenderer assumes that there _is_ a RenderWindow associated with it,
> so my idea isn't applicable.
>
> Next idea was to create a vtkRenderWindow-Instance and assign a new
> Device-/Render-Context via SetContextId(), SetDisplayId() and
> SetDeviceContext() - methods. But that methods are Win32-specific - which
is
> not what I want.
>
> Another drawback would be, that I can't use any Interactor without having
a
> RenderWindow-Instance to assign to it - am I right?!?
>
> Is anybody out there with a similar problem and could give me some tips?
> What would be the best solution - to create a specific RenderWindow, or to
> subclass vtkRenderer to create a "GimmePlainGL-class" to suits my needs?!?
> =|
>
>
> Thanks in advance!
>
> Greetings, Marian
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list