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

TINGAUD Frederic Frederic.TINGAUD at murex.com
Thu Nov 8 09:33:52 EST 2012


Hi Dario,

Thanks for sharing your solution.
I too am using VTK through Java on a Windows platform and am struggling with the Pixel Format errors. Now on my system, this error is far from being systematic. In fact, calling the Render method before the Java window is ready is the only way to have openGL multi sampling (until the patch I submitted on this issue is merged :) ), but on my system, it fails with Pixel format error around once every 10 run. Does it really crash every time you call the rendering? May I ask what your other error was? 

Regards,

Frederic


-----Message d'origine-----
De : vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] De la part de Dario Veneziani
Envoyé : jeudi 8 novembre 2012 11:33
À : vtkusers at vtk.org
Objet : Re: [vtkusers] java bindings mouseMoved before vtkPanel being able to pick actors (win32)

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_GetMagnific
> ationMinValue_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

_______________________________________________
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
*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.




More information about the vtkusers mailing list