[vtkusers] FLTK and vtk questions
John Shalf
jshalf at lbl.gov
Wed Feb 7 15:19:39 EST 2001
Hi,
There shouldn't be any restriction with the Fl stuff to keep you from using multiple render
windows (its been done before). You wouldn't happen to be sharing a renderer with multiple
render windows would you? You must have completely separate instances of Fl_vtk_windows,
vtkFlWindow, and vtkRenderer if you want to have multiple render windows.
-john
Steve Woolsey wrote:
> A couple of issues in using vtk with FLTK. I downloaded John Shalf's
> vtkFlWindow stuff, and got things working ok. Now I have multiple FLTK
> windows, each with a vtk subwindow. The main window comes up ok, and I
> have a vtk area which renders fine. When I try to spawn a second
> window, from a menu option in the main window, I get a seg fault when on
> exit from my CrossSection3D::Show function (see below). It is identical
> to the one I used for the main window, but here it doesn't work. If I
> comment out the vtk stuff, the window comes up fine. Do I need to do
> something special with this FLTK/VTK stuff to get multiple windows?
> Some of my code follows. I know that FLTK isn't "officially" supported,
> but am hoping someone out there has run into this problem before. Any
> help would be greatly appreciated.
>
> Steve
>
> Fl_Menu_Item CrossSection3D::menu_CrossSectionMenuBar[] = {
> {"Options", 0, 0, 0, 192, 0, 0, 14, 0},
> {"Close", 0, 0, 0, 0, 0, 0, 14, 0},
> {0},
> {0}
> };
> Fl_Menu_Item* CrossSection3D::crossSectionMenuOptions =
> CrossSection3D::menu_CrossSectionMenuBar + 0;
> Fl_Menu_Item* CrossSection3D::MenuOptionClose =
> CrossSection3D::menu_CrossSectionMenuBar + 1;
>
> CrossSection3D::CrossSection3D() {
> Fl_Window* w;
> { Fl_Window* o = View3D = new Fl_Window(813, 850, "Lithography v0.5 -
> 3D Cross-Section");
> w = o;
> o->user_data((void*)(this));
> { Fl_Group* o = new Fl_Group(0, 0, 813, 850);
> { Fl_Menu_Bar* o = CrossSectionMenuBar = new Fl_Menu_Bar(0, 0,
> 800, 25);
> o->menu(menu_CrossSectionMenuBar);
> }
> { Fl_Slider* o = sliderScaleZ = new Fl_Slider(65, 825, 735, 25,
> "Z-Scale");
> o->type(5);
> o->align(FL_ALIGN_LEFT);
> }
> { renWin2 = vtkFlRenderWindow::New();
> ren2 = vtkRenderer::New();
> renWin2->AddRenderer(ren2);
> }
> o->end();
> }
> o->end();
> }
> }
>
> void CrossSection3D::Show() {
> View3D->show();
> View3D->begin();
> vtkWin2 = new Fl_vtk_Window(renWin2, 0, 25, 800, 800);
> vtkWin2->show();
> View3D->end();
> } //****Seg faults at the exit of this function.
>
> --
> -------------------------------------------------------------------
> Steven Woolsey Engineer/Scientist
> Bechtel BWXT Idaho, LLC Visualization Engineer
> Idaho National Engineering Lab. EMAIL: woolsr at inel.gov
> P.O. Box 1625, M.S. 3605
> Idaho Falls, ID 83415-3605
> -------------------------------------------------------------------
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list