[vtkusers] Problems with OGL crash and viewing multiple actors

Hills David A DAHILLS at qinetiq.com
Fri Oct 24 08:35:11 EDT 2008


I'm new to VTK so forgive me if I'm being really stupid with anything. I
also couldn't find any rules or guides about posting to this list so,
again, sorry if I annoy anyone.

 

I'm writing a GUI using visual studio and Qt. I'm trying to use vtk to
show some elements entered in the GUI. They are basically lines and
boxes. I'm having two problems:

 

1)       The Qt widget that I open (as a modal dialog) with vtk window
in it opens fine with a cylinder displayed in it (like in the example qt
code) but the app crashes whenever I regain focus (like if I switch
between windows). An assert is failing here:
COpenGLControls::BeginOpenGLDrawing(): ASSERT(!m_hDC==!m_CountBeginEnd).
M_hDC is a NULL pointer and m_CountBeginEnd is 1. I've no idea what this
is about. The window that my modal dialog gets opened from also has so
OpenGL widgets in it (perhaps this is related) although these are just
hand coded OGL.

2)       I'm having trouble displaying more than one actor. I'm
representing each "line" in my GUI using a vtkLineSource
->vtkPolyDataMapper -> vtkActor -> vtkRenderer. When I try to add
several of these lines (instantiating new lines and mappers and actors
of course) I only see the last of them in the display. Any idea what I'm
going wrong? I switch on immediate mode rendering for the mappers if
that's important. I'm also calling ResSetCamera on the renderer but
other than that, I just connect them all up.

 

I do all of the setup in the widget's constructor. Do I need to do
something with an OnDraw function or anything like that?

 

Thanks for your help

 Dave


The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England & Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, Hampshire, GU14 0LX, United Kingdom 
http://www.qinetiq.com/home/notices/legal.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081024/1751d0f9/attachment.htm>


More information about the vtkusers mailing list