[vtkusers] Adding a VTK widget to a XMotif Application

Chris Bayley bayley at me.queensu.ca
Mon May 7 14:11:37 EDT 2001


I am having no end of grief trying to get add a VTK renderer into an
Xmotif Application.  I have followed the XMace example and later added
to it to create two vtkXrenderwindows and all was well.  Then I took
this working code and embedded it into my application and changing my
actors and now my XMotif Widgets won't draw and give me the following
error message:

Loading required GL library /usr/X11R6/lib/libGL.so.1.2.030400
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  19 (X_DeleteProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  89
  Current serial number in output stream:  95

The error is occuring after  :
// get the display connection and give it to the renderer
display = XtDisplay(toplevel);
SurfRenderX->SetDisplayId(display);  //SurfRenderX is a pointer to
depth = SurfRenderX->GetDesiredDepth();
vis = SurfRenderX->GetDesiredVisual();
col = SurfRenderX->GetDesiredColormap();

sprintf(label,"WeldScan %s",filename);
toplevel2 = XtVaCreateWidget(label,topLevelShellWidgetClass, toplevel,
   XmNdepth, depth,
   XmNvisual, vis,
   XmNcolormap, col,

form = XtVaCreateWidget("form",xmFormWidgetClass, toplevel2, NULL);

Crashes at this point with the previous error.

Please, can someone point me in right direction, I am really unclear
what I'm doing wrong,  this exact code worked fine in the XMace example.

Any Help would sure be appreciated.


Chris Bayley

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bayley.vcf
Type: text/x-vcard
Size: 276 bytes
Desc: Card for Chris Bayley
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010507/2ed6311e/attachment.vcf>

More information about the vtkusers mailing list