[vtkusers] ActiViz | vtkRenderWindowInteractor Start event

David Cole dlrdave at aol.com
Tue Apr 1 08:53:36 EDT 2014


Do you have a "main"?

Are you calling "Application::Run(form);"?

WinForms will run a message loop for you if you call the Application 
Run method. In that sense, it does exactly the same thing conceptually 
as vtkRenderWindowInteractor::Start.

The message loop usually looks something like this, if you look at the 
source code for one:

    while (GetMessage(&msg, ...))
    {
      TranslateMessage(&msg);
      DispatchMessage(&msg);
    }

http://en.wikipedia.org/wiki/Message_loop_in_Microsoft_Windows


HTH,
David


-----Original Message-----
From: Matias Montroull <matimontg at gmail.com>
To: David Cole <dlrdave at aol.com>
Cc: vtkusers <vtkusers at vtk.org>
Sent: Mon, Mar 31, 2014 8:56 pm
Subject: Re: [vtkusers] ActiViz | vtkRenderWindowInteractor Start event


Hi David, thanks for the response.


I'm using this into a Windows Form Application. What would be my 
message loop? I'm not quite sure what that means, can you explain a bit 
more?


Thanks!





On Sat, Mar 29, 2014 at 1:59 PM, David Cole <dlrdave at aol.com> wrote:

iren.Start(); runs a message loop, and doesn't exit until you as a user 
exit that window (either press the 'q' key, or close the window)

If you don't want that because you're building this into an application 
where you already have your own message loop, then simply don't call 
iren.Start();...

Instead, call "renwin.Render();" to show the window and render its 
contents. If you're running in the context of a WinForms application, 
or something like it, then your message loop should suffice to cause 
events to be processed for the render window.


HTH,
David C.







More information about the vtkusers mailing list