0022962: Invalid realization of reading and writing material in STEP.
[occt.git] / src / OpenGl / OpenGl_togl_depthtest.cxx
1 /***********************************************************************
2
3 FONCTION :
4 ----------
5 File OpenGl_togl_depthtest :
6 GL_DEPTH_TEST
7 +
8 GL_LIGHTING
9
10 HISTORIQUE DES MODIFICATIONS   :
11 --------------------------------
12 22-10-01 : SAV ; Creation.
13
14 ************************************************************************/
15
16 /*----------------------------------------------------------------------*/
17 /*
18 * Includes
19 */
20
21 #include <OpenGl_tgl_all.hxx>
22 #include <OpenGl_tsm_ws.hxx>
23 #include <InterfaceGraphic_Graphic3d.hxx>
24 #include <InterfaceGraphic_Visual3d.hxx>
25
26
27 #define  BUC61044    /* 25/10/01 SAV ; added functionality to control gl depth testing
28 from higher API */
29 #define  BUC61045    /* 25/10/01 SAV ; added functionality to control gl lighting 
30 from higher API */
31
32 #ifdef BUC61044
33 void EXPORT call_togl_depthtest( CALL_DEF_VIEW *aview, Tint dFlag )
34 {
35   CMN_KEY_DATA key;
36
37   key.ldata = dFlag;
38
39   TsmSetWSAttri( aview->WsId, WSDepthTest, &key );
40 }
41
42 Tint EXPORT call_togl_isdepthtest( CALL_DEF_VIEW *aview )
43 {
44   CMN_KEY_DATA key;
45
46   TsmGetWSAttri( aview->WsId, WSDepthTest, &key );
47
48   return key.ldata;
49 }
50 #endif
51
52 #ifdef BUC61045
53 void EXPORT call_togl_gllight( CALL_DEF_VIEW *aview, Tint dFlag )
54 {
55   CMN_KEY_DATA key;
56
57   key.ldata = dFlag;
58
59   TsmSetWSAttri( aview->WsId, WSGLLight, &key );
60 }
61
62 Tint EXPORT call_togl_isgllight( CALL_DEF_VIEW *aview )
63 {
64   CMN_KEY_DATA key;
65
66   TsmGetWSAttri( aview->WsId, WSGLLight, &key );
67
68   return key.ldata;
69 }
70 #endif