[vtkusers] Issue with VTK and windows 64BIT
David Cole
david.cole at kitware.com
Thu Dec 21 12:16:35 EST 2006
I committed some changes yesterday to VTK that fix interactor/window
problems with 64-bit Windows builds. There are fewer failing tests on the
only experimental dashboard running in that configuration. The remaining
ones are being investigated...
If anybody listening on this list could update and build 64 bit Windows
builds of VTK, it should be mostly working now. Please post questions here
on the list if any further issues arise...
Also: anybody able to contribute a 64-bit Windows VTK dashboard on a regular
basis would be a welcome addition to our current set of contributors.
Thanks,
David Cole
Kitware, Inc.
On 12/19/06, L.J. van Ruijven <L.J.vanRuijven at amc.uva.nl> wrote:
>
> Hello David,
>
> Class vtkWin32OpenGLRenderWindow reserves extra bytes in its window
> class. I use vtkWndOffset as an offset into this buffer. Comming to
> think of it, the change I mentioned must also be applied to class
> vtkWin32OpenGLRenderWindow.
> I did not save the original code, so I give you the places where
> vtkWndOffset occurs in my current code. In class
> vtkWin32OpenGLRenderWindow I use vtkWndOffset in the method WndProc in
> the statement
>
> vtkWin32OpenGLRenderWindow *me =
> (vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(hWnd,vtkWndOffset);
>
> in the method CreateAWindow in the statements
>
> wndClass.cbWndExtra = 2 * vtkWndOffset;
>
> vtkSetWindowLong(this->WindowId,vtkWndOffset,(vtkLONG)this);
>
> and finally in the method Finalize in the statement
>
> vtkSetWindowLong(this->WindowId,vtkWndOffset,(vtkLONG)0);
>
>
> In class vtkWin32RenderWindowInteractor I use vtkWndOffset in its
> destructor in the statement
>
> tmp = (vtkWin32OpenGLRenderWindow *)(vtkGetWindowLong(this-
> >WindowId,vtkWndOffset));
>
> in the method Enable in the statement
>
> tmp=(vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(this-
> >WindowId,vtkWndOffset);
>
> and in the method Disable in the statement
>
> tmp = (vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(this-
> >WindowId,vtkWndOffset);
>
> Finally, I use vtkWndOffset in the procudure vtkHandleMessage in the
> statement
>
> ren = (vtkWin32OpenGLRenderWindow *)vtkGetWindowLong
> (hWnd,vtkWndOffset);
>
> Hope this answers your question.
>
> Leo van Ruijven.
>
>
>
>
>
> ----- Original Message -----
> From: David Cole <david.cole at kitware.com>
> Date: Tuesday, December 19, 2006 3:48 pm
> Subject: Re: [vtkusers] Issue with VTK and windows 64BIT
>
> > Thanks for this... I'll try to to get this committed this week.
> > (That code
> > recently moved into header file Common/vtkWin32Header.h...)
> >
> > Where do you use "vtkWndOffset"? You added that, but didn't
> > mention where
> > you're using it...
> >
> > Thanks,
> > David Cole
> > Kitware, Inc.
> >
> >
> > On 12/19/06, L.J. van Ruijven <L.J.vanRuijven at amc.uva.nl> wrote:
> > >
> > > Hi,
> > >
> > > I am using VTK for windows x64. In the past several problems were
> > > solved thanks to Jeremy Drysdale and Andreas Gerndt (see
> > > http://public.kitware.com/pipermail/vtkusers/2006-
> > August/086498.html).> However, problems with the interaction still
> > remained. I found that
> > > several of the remaining issues are solverd with the following fix:
> > >
> > > In vtkWin32RenderWindowInteractor.cxx change:
> > >
> > > #if ( _MSC_VER >= 1300 ) // Visual studio .NET
> > > #pragma warning ( disable : 4311 )
> > > #pragma warning ( disable : 4312 )
> > > # define vtkGWLP_HINSTANCE GWLP_HINSTANCE
> > > # define vtkGetWindowLong GetWindowLongPtr
> > > # define vtkSetWindowLong SetWindowLongPtr
> > > #else // regular Visual studio
> > > # define vtkGWLP_HINSTANCE GWL_HINSTANCE
> > > # define vtkGetWindowLong GetWindowLong
> > > # define vtkSetWindowLong SetWindowLong
> > > #endif //
> > >
> > > into:
> > >
> > > #if ( _MSC_VER >= 1300 ) // Visual studio .NET
> > > #pragma warning ( disable : 4311 )
> > > #pragma warning ( disable : 4312 )
> > > # define vtkGWLP_HINSTANCE GWLP_HINSTANCE
> > > # define vtkLONG LONG_PTR
> > > # define vtkWndOffset sizeof(vtkLONG)
> > > # define vtkGetWindowLong GetWindowLongPtr
> > > # define vtkSetWindowLong SetWindowLongPtr
> > > #else // regular Visual studio
> > > # define vtkGWLP_HINSTANCE GWL_HINSTANCE
> > > # define vtkLONG LONG
> > > # define vtkWndOffset sizeof(vtkLONG)
> > > # define vtkGetWindowLong GetWindowLong
> > > # define vtkSetWindowLong SetWindowLong
> > > #endif //
> > >
> > > Now change all occurences of LONG into vtkLONG.
> > >
> > > Leo.
> > >
> > >
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQ
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >
> > >
> > >
> > >
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061221/c989a6c7/attachment.htm>
More information about the vtkusers
mailing list