1 // File OpenGl_GraphicDriver_713.cxx
5 // SAV 09/07/02 merged with OpenGl_GraphicDriver_713.cxx created 16/06/2000 by ATS,SPK,GG : G005
6 // implementation of PARRAY method
8 #include <OpenGl_GraphicDriver.jxx>
10 #include <Aspect_DriverDefinitionError.hxx>
13 #include <OpenGl_tgl_funcs.hxx>
14 #include <OpenGl_telem_util.hxx>
17 #define BUC61044 /* 25/10/01 SAV ; added functionality to control gl depth testing
19 #define BUC61045 /* 25/10/01 SAV ; added functionality to control gl lighting
23 void OpenGl_GraphicDriver::SetDepthTestEnabled( const Graphic3d_CView& view,
24 const Standard_Boolean isEnabled ) const
28 Graphic3d_CView MyCView = view;
29 call_togl_depthtest( &MyCView, isEnabled );
34 Standard_Boolean OpenGl_GraphicDriver
35 ::IsDepthTestEnabled( const Graphic3d_CView& view ) const
38 Graphic3d_CView MyCView = view;
39 if ( call_togl_isdepthtest( &MyCView ) )
44 void OpenGl_GraphicDriver::ReadDepths( const Graphic3d_CView& view,
45 const Standard_Integer x,
46 const Standard_Integer y,
47 const Standard_Integer width,
48 const Standard_Integer height,
49 const Standard_Address buffer ) const
51 TelReadDepths (view.WsId, x, y, width, height, (float*) buffer);
54 void OpenGl_GraphicDriver::SetGLLightEnabled( const Graphic3d_CView& view,
55 const Standard_Boolean isEnabled ) const
58 Graphic3d_CView MyCView = view;
59 call_togl_gllight( &MyCView, isEnabled );
63 Standard_Boolean OpenGl_GraphicDriver
64 ::IsGLLightEnabled( const Graphic3d_CView& view ) const
67 Graphic3d_CView MyCView = view;
68 if ( call_togl_isgllight( &MyCView ) )
73 void OpenGl_GraphicDriver :: PrimitiveArray( const Graphic3d_CGroup& ACGroup,
74 const Graphic3d_PrimitiveArray& parray,
75 const Standard_Boolean EvalMinMax )
77 Graphic3d_CGroup MyCGroup = ACGroup;
79 if( parray ) call_togl_parray (&MyCGroup,parray);
83 void OpenGl_GraphicDriver :: UserDraw ( const Graphic3d_CGroup& ACGroup,
84 const Graphic3d_CUserDraw& AUserDraw )
86 Graphic3d_CGroup MyCGroup = ACGroup;
87 Graphic3d_CUserDraw MyUserDraw = AUserDraw;
89 call_togl_userdraw (&MyCGroup,&MyUserDraw);
92 extern int VBOenabled;
94 void OpenGl_GraphicDriver :: EnableVBO( const Standard_Boolean flag )