1 /***********************************************************************
5 file OpenGl_togl_begin.c :
12 HISTORIQUE DES MODIFICATIONS :
13 --------------------------------
14 xx-xx-xx : CAL ; Creation.
15 21-01-97 : CAL : Ajout temporaire d'un XSynchronize pour
16 eviter un SEG V lors de la destruction d'une vue.
17 05-02-97 : FMN ; Suppression de OpenGl_tgl_vis.h
18 25-03-97 : CAL : getenv de CSF_GraphicSync
19 04-11-97 : FMN : ajout InitExtensionGLX();
20 17-03-98 : FMN ; Ajout mode animation
21 24-11-98 : FMN ; Correction sur la gestion de la perspective (cf Programming Guide)
22 22-12-98 : FMN ; Rename CSF_WALKTHROW en CSF_WALKTHROUGH
23 08/04/02 : GG ; RIC120302 Add call_togl_begin_display() function
25 ************************************************************************/
27 #define G003 /* GG 25-01-00 Enable animation always ...
28 // See V3d_View::SetAnimationMode()
31 /*----------------------------------------------------------------------*/
38 #include <OpenGl_tgl_all.hxx>
39 #include <InterfaceGraphic_Graphic3d.hxx>
40 #include <InterfaceGraphic_Visual3d.hxx>
41 #include <OpenGl_tgl.hxx>
42 #include <OpenGl_tgl_tox.hxx>
43 #include <OpenGl_tgl_funcs.hxx>
44 #include <OpenGl_Extension.hxx>
45 #include <OpenGl_animation.hxx>
47 /*----------------------------------------------------------------------*/
52 EXPORT GLboolean env_walkthrow = GL_FALSE;
53 /* OCC18942: The new symmetric perspective projection matrix is off by default */
54 EXPORT GLboolean env_sym_perspective = GL_FALSE;
56 /*----------------------------------------------------------------------*/
59 Opens and initialises Graphic Library environment.
60 Returns true if the Graphic Library environment is open.
61 Returns false if the Graphic Library environment is closed (error).
73 call_togl_set_environment (adisplay);
75 if ((pvalue = getenv ("CSF_GraphicSync")) != NULL)
76 XSynchronize (call_thedisplay, 1);
77 InitExtensionGLX(call_thedisplay);
80 /* Test si mode workthrough oui/non */
81 if ((pvalue = getenv ("CSF_WALKTHROUGH")) != NULL)
82 env_walkthrow = GL_TRUE;
84 /* Activation/Desactivation du mode Animation */
86 if ((pvalue = getenv ("CALL_ANIMATION")) != NULL)
87 animationUseFlag = GL_TRUE;
89 animationUseFlag = GL_FALSE;
92 /* OCC18942: Test if symmetric perspective projection should be turned on */
93 if ((pvalue = getenv ("CSF_SYM_PERSPECTIVE")) != NULL)
94 env_sym_perspective = GL_TRUE;
96 call_togl_inquirefacilities ();
97 call_func_init_tgl ();
104 Sets the Graphic Library environment.
105 Returns true if the Graphic Library environment is open.
106 Returns false if the Graphic Library environment is closed (error).
112 call_togl_begin_display
120 status = call_tox_set_display (pdisplay);
123 if ((pvalue = getenv ("CSF_GraphicSync")) != NULL)
124 XSynchronize (call_thedisplay, 1);
125 InitExtensionGLX(call_thedisplay);
127 call_togl_inquirefacilities ();
128 call_func_init_tgl ();