1 /***********************************************************************
5 File OpenGl_togl_view :
11 HISTORIQUE DES MODIFICATIONS :
12 --------------------------------
13 xx-xx-xx : xxx ; Creation.
14 08-07-96 : FMN ; Suppression appel call_togl_ car deja fait dans
16 17-07-96 : FMN ; Suppression appel call_subr_hlhsr
17 30-01-97 : FMN ; Suppression call_util_init_indexes()
18 30-06-97 : FMN ; Suppression code inutile
19 08-09-97 : CAL ; subr_open_ws retourne 0 si pb.
20 24-12-97 : FMN ; Suppression de call_func_set_back_int_shad_meth()
22 ************************************************************************/
24 /*----------------------------------------------------------------------*/
29 #include <OpenGl_tgl_all.hxx>
31 #include <InterfaceGraphic_Labels.hxx>
32 #include <InterfaceGraphic_Graphic3d.hxx>
33 #include <InterfaceGraphic_Visual3d.hxx>
35 #include <OpenGl_tgl_vis.hxx>
36 #include <OpenGl_tgl_util.hxx>
37 #include <OpenGl_tgl_funcs.hxx>
38 #include <OpenGl_tgl_subrvis.hxx>
39 #include <OpenGl_tgl_utilgr.hxx>
41 /*----------------------------------------------------------------------*/
50 if (! call_subr_open_ws(aview))
53 call_util_init_filters(aview->WsId);
55 if( call_util_test_structure(aview->ViewId) )
56 call_func_del_struct(aview->ViewId);
58 call_func_set_edit_mode(CALL_PHIGS_EDIT_INSERT);
60 call_func_open_struct(aview->ViewId);
61 call_func_label (View_LABViewIndex);
62 call_func_set_view_ind (aview->ViewId);
64 call_func_label (View_LABViewContext);
65 switch (aview->Context.Visualization)
67 case 0 : /* VISUAL3D_TOV_WIREFRAME */
68 call_func_appl_data (0);
70 case 1 : /* VISUAL3D_TOV_SHADING */
71 switch (aview->Context.Model)
73 case 0 : /* VISUAL3D_TOM_NONE */
74 call_func_set_int_shad_meth (CALL_PHIGS_SD_NONE);
76 case 1 : /* VISUAL3D_TOM_INTERP_COLOR */
77 call_func_set_int_shad_meth (CALL_PHIGS_SD_COLOUR);
79 case 2 : /* VISUAL3D_TOM_FACET */
80 call_func_set_int_shad_meth
81 (CALL_PHIGS_SD_DOT_PRODUCT);
83 case 3 : /* VISUAL3D_TOM_VERTEX */
84 call_func_set_int_shad_meth (CALL_PHIGS_SD_NORMAL);
86 case 4 : /* VISUAL3D_TOM_HIDDENLINE */
87 call_func_set_int_shad_meth (CALL_PHIGS_SD_NONE);
93 call_func_label (View_LABHlhsr);
94 call_func_appl_data (0);
96 call_func_label (View_LABLight);
97 call_func_appl_data (0);
99 call_func_label (View_LABPlane);
100 call_func_appl_data (0);
102 call_func_label (View_LABAliasing);
103 call_func_appl_data (0);
105 call_func_label (View_LABDepthCueing);
106 call_func_appl_data (0);
108 call_func_label (View_LABPriority00);
109 call_func_label (View_LABPriority01);
110 call_func_label (View_LABPriority02);
111 call_func_label (View_LABPriority03);
112 call_func_label (View_LABPriority04);
113 call_func_label (View_LABPriority05);
114 call_func_label (View_LABPriority06);
115 call_func_label (View_LABPriority07);
116 call_func_label (View_LABPriority08);
117 call_func_label (View_LABPriority09);
118 call_func_label (View_LABPriority10);
119 call_func_label (View_LABEnd);
120 call_func_label (View_LABImmediat1);
121 call_func_label (View_LABImmediat2);
122 call_func_close_struct ();
124 if( call_viewrep.active_status == TOff )
125 {/* First time. Set defaults */
126 call_viewrep.active_status = TOn;
127 call_viewrep.shield_indicator = TOn;
128 call_viewrep.border_indicator = TOff; /* non utilise */
129 call_viewrep.shield_colour.rgb[0] = ( float )0.0,
130 call_viewrep.shield_colour.rgb[1] = ( float )0.0,
131 call_viewrep.shield_colour.rgb[2] = ( float )0.0;
132 call_viewrep.border_colour.rgb[0] = ( float )0.0,
133 call_viewrep.border_colour.rgb[1] = ( float )0.0,
134 call_viewrep.border_colour.rgb[2] = ( float )0.0;