[vtkusers] java bindings mouseMoved before vtkPanel being able to pick actors (win32)

Dario Veneziani dario at netfarm.it
Thu Nov 8 05:32:36 EST 2012


On 07/11/2012 11.20, Dario Veneziani wrote:
> Hi all,
>
> I'm embeddeding a vtkPanel into a java swing based application.
> The parent widget is a JTabbedPane.
> My code captures mouseMoved to pick the actor hovered by the mouse 
> pointer.
> I've looked a bit in the pick code and vtk asks actor if they need to 
> render.
> The problem is I get mouseMoved even when mouse is not moved
> (I've tried an action with a menu using keyboard).
> If the render is not done the pick will fail while trying to render 
> (ChoosePixelFormat)
>
> I've enabled vtk message confirmation and took a stacktrace with 
> process explorer
>
> vtkRendering.dll!vtkWin32OpenGLRenderWindow::SetupPixelFormat+0x44d
> vtkRendering.dll!vtkWin32OpenGLRenderWindow::CreateAWindow+0x38a
> vtkRendering.dll!vtkWin32OpenGLRenderWindow::WindowInitialize+0x71
> vtkRendering.dll!vtkRenderWindow::DoAARender+0x389
> vtkRendering.dll!vtkRenderWindow::Render+0x326
> vtkRenderingJava.dll!Java_vtk_vtkLineIntegralConvolution2D_GetMagnificationMinValue_133+0x1f 
>
>
>
> I've got two different errors but both are related to actor picking, I 
> may add some code to avoid picking
> if the vtkPanel is not ready to pick, but looks like there is no way 
> to known if I can pick, at least from java
>
> Regards,
>
> Dario
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers

Problem solved by testing isWindowSet() before picking.

Dario




More information about the vtkusers mailing list