[vtkusers] invalid drawable ; Mac OSX Mavericks and vtk 6.1

David Gobbi david.gobbi at gmail.com
Tue Jul 29 14:20:02 EDT 2014


Hi Totte,

I'm not sure, but it might work if you call Initialize() before Start():

  renderWindowInteractor->Initialize();
  renderWindowInteractor->Start();

 - David

On Tue, Jul 29, 2014 at 11:20 AM, Totte Karlsson <tottek at gmail.com> wrote:
> Hello Kiro and David,
> Thanks very much for response. I can see you have a solution for this
> problem when you are using qtwidgets. I do believe I'm not using those
> widgets, but I'm not sure cause I'm new to the mac. Does perhaps the
> simplest vtk example create a widget?
>
> Anyway, I did created a very simple example demonstrating my problem, which
> happens when trying to 'reuse' a vtkInteracactor, i.e.
>
>   main()
>   {
>   // setup vtkwindow, renderer and interactor
>
>    // Render and interact
>    renderWindow->Render();
>    renderWindow->SetWindowName("First Window");
>
>   //Interact until user presses 'e'
>   renderWindowInteractor->Start();
>
>   std::cout << "Window 1 closed..." << std::endl;
>   //Now do some changes to the 'scene'.. and then start interaction again..
>
>   //Hoops this does not work.. :(
>   renderWindowInteractor->Start(); //<-- Actually, here I don't even see a
> window
>  }
>
> Question is, how to rewrite the above code (for the mac) so I can provide
> the user with 'two passes' of interaction?
>
> Currently, code like this is called in python scripts. The user sets up a
> 'scene' and interacts with it. When 'e' is pressed, the code moves on and
> some things are changed in the scene, and then a subsequent interaction
> session is to be opened.
>
> As you can see, this code is not designed with a UI, but is just meant to
> work with the simple 'interaction' tools that the vtk interactor provides
>
> Perhaps I need to create a completely new renderwindow and interactor?
> tk
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/invalid-drawable-Mac-OSX-Mavericks-and-vtk-6-1-tp5727997p5728005.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers


More information about the vtkusers mailing list