@@ -38,34 +38,35 @@ void Display3d::Init(long window_handle)
3838{
3939 printf (" ###### 3D rendering pipe initialisation #####\n " );
4040 printf (" Display3d class initialization starting ...\n " );
41- // Create Graphic Device and Window
41+ // Create graphic driver
42+ Handle (Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection ();
43+ printf (" Aspect_DisplayConnection created.\n " );
44+ if (GetGraphicDriver ().IsNull ())
45+ {
46+ GetGraphicDriver () = Graphic3d::InitGraphicDriver (aDisplayConnection);
47+ }
48+ printf (" Graphic_Driver created.\n " );
49+ // Create Graphic Device and Window
4250 #ifdef WNT
4351 myWindow = new WNT_Window ((Aspect_Handle) window_handle);
4452 printf (" WNT window created.\n " );
4553 #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
4654 myWindow = new Cocoa_Window ((NSView *) window_handle);
4755 printf (" Cocoa window created.\n " );
4856 #else
49- Handle (Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection ();
5057 myWindow =new Xw_Window (aDisplayConnection, (Window) window_handle);
5158 printf (" Xw_Window created.\n " );
5259 #endif
53- // Create graphic driver
54- Handle (Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection ();
55- if (GetGraphicDriver ().IsNull ())
56- {
57- GetGraphicDriver () = Graphic3d::InitGraphicDriver (aDisplayConnection);
58- }
5960 // Create V3dViewer and V3d_View
6061 myV3dViewer = new V3d_Viewer (GetGraphicDriver (), (short * const )" viewer" );
61- printf (" Viewer created.\n " );
62+ printf (" V3d_Viewer created.\n " );
6263 myV3dView = myV3dViewer->CreateView ();
63- printf (" View created\n " );
64+ printf (" V3d_View created\n " );
6465 myV3dView->SetWindow (myWindow);
6566 if (!myWindow->IsMapped ()) myWindow->Map ();
6667 // Create AISInteractiveViewer
6768 myAISContext = new AIS_InteractiveContext (myV3dViewer);
68- printf (" Interactive context created.\n " );
69+ printf (" AIS_InteractiveContext created.\n " );
6970 printf (" Display3d class successfully initialized.\n " );
7071 printf (" ########################################\n " );
7172}
0 commit comments