For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Xw_Window parent

Anonymous's picture
Forums: 

Dear all,

I'm trying to use the class Xw_Window My aim is to reparent the default Cascade Window with my own X11 Window.

1 - I create a X11 Window (= win1) 2 - I create a Xw_Window as follow : aWindow = new Xw_Window(aGraphic3dDevice,

"CASWX11"

0.5,0.5,0.3,0.3,

Xw_WQ_3DQUALITY,

Quantity_NOC_BLACK,

win1);

But it doesn't work : *Xw_Error_4/1*code 3/'BadWindow (invalid Window parameter)' from Xw_error_handler routine *Xw_Error_4/1*code 3/'BadWindow (invalid Window parameter)' from Xw_error_handler routine *Xw_Error_3/2*Bad Window 0 Attributes from Xw_get_window_position routine

Could someone help me ? Thanks.

Francois Lauzon's picture

What I'm doing is using the constructor Xw_Window::Xw_Window(const Handle(Xw_GraphicDevice)& Device,const Aspect_Handle& aWindow,const Xw_WindowQuality aQuality = Xw_WQ_SAMEQUALITY,const Quantity_NameOfColor BackColor = Quantity_NOC_MATRAGRAY);

and passing the X window id as the Aspect_Handle aWindow parameter. The thing you should know is that you have to setup an opengl rendering context for 3d is you're creating a window for drawing 3d...