[vtkusers] Problem QVTKWidget using vtkCarbonRenderWindow instead of vtkCocoaRenderWindow
Elvis Dowson
elvis.dowson at mac.com
Tue Sep 23 09:27:36 EDT 2008
Hi,
I just downloaded the latest vtk-5.x sources from cvs
(vtk-5.3) and tried to compile shared libraries, with
Problem Outline
VTK_USE_CARBON=OFF
VTK_USE_COCOA=ON
VTK_GUI_SUPPORT=ON
VTK_USE_QVTK=ON
DESIRED_QT_VERSION=4
I am using qt-4.4.2 for mac os, which has support for Cocoa.
Somehow, even through I have disabled support for Carbon, this error
comes up.
"vtkCarbonRenderWindow::UpdateGLRegion()", referenced from:
QVTKWidget::DirtyRegionProcessor(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) in libQVTK.a(QVTKWidget.o)
If I look at the file GUISupport/Qt/CMakeLists.cxx (what is this file
used for BTW?)
I see the following implementation. Shouldn't it use
vtkCocoaRenderWindow instead?
#if defined (Q_WS_MAC) && QT_VERSION >= 0x040000
OSStatus QVTKWidget::DirtyRegionProcessor(EventHandlerCallRef,
EventRef event, void* wid)
{
QVTKWidget* widget = reinterpret_cast<QVTKWidget*>(wid);
UInt32 event_kind = GetEventKind(event);
UInt32 event_class = GetEventClass(event);
if(event_class == 'cute' && event_kind == 20)
{
static_cast<vtkCarbonRenderWindow*>(widget->GetRenderWindow())-
>UpdateGLRegion();
}
return eventNotHandledErr;
}
#endif
If I look at the file QVTKWidget.h
there is no implementation for the case when qt version >= 4 and the
user selects the Cocoa libraries.
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040000
#include <Carbon/Carbon.h> // Event handling for dirty region
#endif
How can I go about trying to fix this?
Where is Q_WS_MAC defined?
General Question
What should I do to make the modifications to support Cocoa for QVTK?
Best regards,
Elvis Dowson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080923/0d546425/attachment.htm>
More information about the vtkusers
mailing list