[vtkusers] Rendering into pre-existing OpenGL-window without any vtkRenderWi ndow-Instance

Saeger, Marian Marian.Saeger at eads.net
Wed May 12 05:23:37 EDT 2004


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




More information about the vtkusers mailing list