[vtkusers] vtkFlRenderWindowInteractor in Mac OS X

Marius S Giurgi rendezvous at dreamxplosion.com
Mon Jan 31 12:52:53 EST 2005


Anybody tried to use vtkFlRenderWindowInteractor in Mac OS X?

Yes, I did study the example over and over and over, but... there are 
still a few issues. Perhaps I'm still missing something. (maybe someone 
could help me out? please?)

First of all, in Charl's Cone3 example it says:

   // this is the standard way of "starting" a fltk application
   int fl_ret = Fl::run();

This should be about right, BUT just to test it,  I "bracketed" the 
loop-starting command with:

   cout << "Starting the loop" << endl;

   // this is the standard way of "starting" a fltk application
   int fl_ret = Fl::run();
   // very huge NB: note that we ->Delete() the 
vtkFlRenderWindowInteractor
   // once we do this, the rest of the vtk pipeline will really disappear

   cout << "Ending the loop" << endl;

As one should expect, after hitting the quit button, or close the 
application, the loop gets interrupted and the rest of the code (after 
the Fl::run) gets executed, which is, delete the fl_vtk_window, etc. 
The "Ending the loop" messages should display as well.

However, what I found out is that the code after the Fl::run never gets 
executed (there's no "Ending the loop" message when I quit the 
application). Am I lacking some fundamental concepts here? Is this 
supposed to happen? Again this runs in Mac OS X.


Second:
in the Cone3 example the quit button and the text does NOT appear, as 
the vtk window overlaps with it. I included a few captures below.

Note: on Apple (Mac OS X) the default FLTK resource fork (/FL/mac.r) 
has to be attached to the executable
in order to interact with the window at all. (the following captures 
were taken without this fork attached to the Cone3 executable, however 
attaching the fork doesn't change the display).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture-1.jpg
Type: image/jpeg
Size: 12196 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050131/9df2ab39/attachment.jpg>
-------------- next part --------------

Capture1: Plain build of the Cone3 example. Actually you can see the 
text being displayed for
a fraction of a second then the vtk windows get displayed on top of 
them.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture-2.jpg
Type: image/jpeg
Size: 11979 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050131/9df2ab39/attachment-0001.jpg>
-------------- next part --------------

Capture2: Here I commented out the  fl_vtk_window2->show(); and rebuilt 
the Cone3
You can see that the text and button now shows (on the second window), 
but (obviously) not
the vtk window. Once I  click on the Second window, the vtk window pops 
up as a separate window.
The Second window can be used for interaction (rotate, move, zoom the 
SuperQuadric that is
displayed in the pop up window). (The vtk window does not allow for 
interaction).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture-3.jpg
Type: image/jpeg
Size: 14556 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050131/9df2ab39/attachment-0002.jpg>
-------------- next part --------------

Capture3: the Quit button is visible and it can be clicked :) However 
regardless of how I chose
to quit the application the rest of the code (after Fl::run) doesn't 
get executed. Why?

marius


More information about the vtkusers mailing list