[vtkusers] Rendering into pre-existing OpenGL-window without any vtkRenderWi ndow-Instance
Charl P. Botha
c.p.botha at ewi.tudelft.nl
Tue May 18 05:06:46 EDT 2004
Saeger, Marian wrote:
> The problem in my case is, that it is a platform dependent solution -
> because the different RenderWindow-Subclasses have different methods to tell
> them "Use that frickin' window!", I would have to decide which methods to
> use via compiler flags or something similar. I would really like to avoid
> this.
Most of the widget set + VTK combinations use this. Please have a look
at the existing code, it's not as complicated as you might think. In
vtkFlRenderWindowInteractor, it comes down to this:
// the first statement is for all platforms
RenderWindow->SetWindowId( (void *)fl_xid( this ) );
#if !defined(WIN32) && !defined(__APPLE__)
// this isn't
RenderWindow->SetDisplayId( fl_display );
#endif
> Next thing is, that i'm not only getting the OpenGL-window from another
> program, the program is responsible for cameras/lights as well. That's the
> reason for my intention to have a Render-thingabob, which really doesn't
> care about anything else than rendering geometry _but_ is able to work
Hmmm, that is quite interesting. It might be easier to transfer the
camera and lighting in your overridden RenderWindow or
RenderWindowInteractor. From the top of my head, I can't think of any
canned solutions for the use case.
Good luck,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers
mailing list