summaryrefslogtreecommitdiff
path: root/src/OpenGl/OpenGl_GraphicDriver_1.cxx
blob: ce7c418b71dd36b2472f17ec23c2305ca6e5a7e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129


// File   OpenGl_GraphicDriver_1.cxx
// Created  Mardi 28 janvier 1997
// Author CAL
// Modified GG 27/12/02 IMP120302 Add new method Begin(Aspect_Display)

//-Copyright  MatraDatavision 1997

//-Version  

//-Design Declaration des variables specifiques aux Drivers

//-Warning  Un driver encapsule les Pex et OpenGl drivers

//-References 

//-Language C++ 2.0

//-Declarations

// for the class
#include <OpenGl_GraphicDriver.jxx>

#include <Aspect_DriverDefinitionError.hxx>

#include <OpenGl_tgl_funcs.hxx>

//-Aliases

//-Global data definitions

//-Methods, in order

//=======================================================================
//function : Begin
//purpose  : 
//=======================================================================

Standard_Boolean OpenGl_GraphicDriver::Begin (const Standard_CString ADisplay)
{


  Standard_Boolean Result;

  if (MyTraceLevel) {
    PrintFunction ("call_togl_begin");
    PrintString ("Display", ADisplay);
  }
  Result = call_togl_begin ((Standard_PCharacter)ADisplay);
  if (MyTraceLevel) {
    PrintIResult ("call_togl_begin", Result);
  }

  return Result;

}

//RIC120302
//=======================================================================
//function : Begin
//purpose  : 
//=======================================================================

Standard_Boolean OpenGl_GraphicDriver::Begin (const Aspect_Display ADisplay)
{

  Standard_Boolean Result;

  if (MyTraceLevel) {
    PrintFunction ("call_togl_begin_display");
  }
  Result = call_togl_begin_display (ADisplay);
  if (MyTraceLevel) {
    PrintIResult ("call_togl_begin_display", Result);
  }

  return Result;

}
//RIC120302

//=======================================================================
//function : End
//purpose  : 
//=======================================================================

void OpenGl_GraphicDriver::End () {

  if (MyTraceLevel) {
    PrintFunction ("call_togl_end");
  }
  call_togl_end ();

}

//=======================================================================
//function : BeginAnimation
//purpose  : 
//=======================================================================

void OpenGl_GraphicDriver::BeginAnimation (const Graphic3d_CView& ACView) {

  Graphic3d_CView MyCView = ACView;

  if (MyTraceLevel) {
    PrintFunction ("call_togl_begin_animation");
    PrintCView (MyCView, 1);
  }
  call_togl_begin_animation (&MyCView);

}

//=======================================================================
//function : EndAnimation
//purpose  : 
//=======================================================================

void OpenGl_GraphicDriver::EndAnimation (const Graphic3d_CView& ACView) {

  Graphic3d_CView MyCView = ACView;

  if (MyTraceLevel) {
    PrintFunction ("call_togl_end_animation");
    PrintCView (MyCView, 1);
  }
  call_togl_end_animation (&MyCView);

}