头文件需要自己引用一下
初始化代码如下
Handle(Aspect_DisplayConnection) aDisplayConnection =
new Aspect_DisplayConnection();
// Get graphic driver if it exists, otherwise initialise it
if (myGraphicDriver.IsNull())
{
myGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);
}
// Get window handle. This returns something suitable for all platforms.
WId window_handle = (WId) winId();
// Create appropriate window for platform
#ifdef WNT
Handle(WNT_Window) wind = new WNT_Window((Aspect_Handle) window_handle);
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
Handle(Cocoa_Window) wind = new Cocoa_Window((NSView *) window_handle);
#else
Handle(Xw_Window) wind = new Xw_Window(aDisplayConnection, (Window) window_handle);
#endif
// Create V3dViewer and V3d_View
myViewer = new V3d_Viewer(myGraphicDriver, Standard_ExtString(&