Commit | Line | Data |
---|---|---|
7fd59977 | 1 | /*********************************************************************** |
2 | ||
3 | FONCTION : | |
4 | ---------- | |
5 | File OpenGl_togl_update : | |
6 | ||
7 | ||
8 | REMARQUES: | |
9 | ---------- | |
10 | ||
11 | ||
12 | HISTORIQUE DES MODIFICATIONS : | |
13 | -------------------------------- | |
14 | xx-xx-xx : xxx ; Creation. | |
15 | 20-02-96 : FMN ; Suppression code inutile: | |
16 | 01-04-96 : CAL ; Integration MINSK portage WNT | |
17 | 05-02-97 : FMN ; Suppression de OpenGl_tgl_vis.h | |
18 | 07-10-97 : FMN ; Simplification WNT | |
19 | 08-08-98 : FMN ; ajout PRINT debug | |
20 | 18-11-98 : CAL ; S4062. Ajout des layers. | |
21 | ||
22 | ************************************************************************/ | |
23 | ||
24 | #define RIC120302 /* GG Avoid duplicate code with | |
25 | // call_togl_redraw | |
26 | */ | |
27 | ||
28 | /*----------------------------------------------------------------------*/ | |
29 | /* | |
30 | * Includes | |
31 | */ | |
32 | ||
33 | #include <OpenGl_tgl_all.hxx> | |
34 | #include <InterfaceGraphic_Graphic3d.hxx> | |
35 | #include <InterfaceGraphic_Visual3d.hxx> | |
36 | #include <OpenGl_tgl_funcs.hxx> | |
37 | #include <OpenGl_tsm_ws.hxx> | |
38 | #ifndef RIC120302 | |
39 | #include <OpenGl_tgl.hxx> | |
40 | #include <OpenGl_txgl.hxx> | |
41 | #include <OpenGl_tgl_tox.hxx> | |
42 | #include <OpenGl_tgl_funcs.hxx> | |
43 | #endif | |
44 | ||
45 | void EXPORT call_togl_update | |
46 | ( | |
47 | CALL_DEF_VIEW * aview, | |
48 | CALL_DEF_LAYER * anunderlayer, | |
49 | CALL_DEF_LAYER * anoverlayer | |
50 | ) | |
51 | { | |
52 | CMN_KEY_DATA data; | |
53 | Tint update_state; | |
54 | #ifndef RIC120302 | |
55 | Tint swap = 1; /* swap buffers ? yes */ | |
56 | #endif | |
57 | ||
58 | TsmGetWSAttri (aview->WsId, WSUpdateState, &data); | |
59 | update_state = data.ldata; | |
60 | /* | |
61 | * Si l'update_state est NotDone, alors on retrace | |
62 | */ | |
63 | if (update_state == TNotDone) { | |
64 | #ifdef RIC120302 | |
65 | call_togl_redraw( aview, anunderlayer, anoverlayer ); | |
66 | #else | |
67 | TsmGetWSAttri (aview->WsId, WSWindow, &data); | |
68 | if (TxglWinset (call_thedisplay, (Window) data.ldata) == TSuccess) { | |
69 | call_func_redraw_all_structs_begin (aview->WsId); | |
2de462d4 A |
70 | |
71 | call_togl_setplane( aview ); /* update clipping planes */ | |
72 | ||
7fd59977 | 73 | if (anunderlayer->ptrLayer) |
74 | call_togl_redraw_layer2d (aview, anunderlayer); | |
75 | call_func_redraw_all_structs_proc (aview->WsId); | |
76 | if (anoverlayer->ptrLayer) | |
77 | call_togl_redraw_layer2d (aview, anoverlayer); | |
78 | call_func_redraw_all_structs_end (aview->WsId, swap); | |
79 | call_togl_redraw_immediat_mode (aview); | |
80 | } | |
81 | #endif | |
82 | } | |
83 | ||
84 | return; | |
85 | } |