summaryrefslogtreecommitdiff
path: root/src/OpenGl/OpenGl_GraphicDriver.cxx
blob: f9060332dfb652ab35a13ca5f7f73387198895f2 (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

// File         OpenGl_GraphicDriver.cxx
// Created      Mardi 28 janvier 1997
// Author       CAL

//-Copyright    MatraDatavision 1997

//-Version      

//-Design       Declaration des variables specifiques aux Drivers

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

//-References   

//-Language     C++ 2.0

//-Declarations

// for the class
#include <OpenGl_GraphicDriver.ixx>
#include <OpenGl_Extension.hxx>

//-Aliases

//-Global data definitions

// Pour eviter de "mangler" MetaGraphicDriverFactory, le nom de la
// fonction qui cree un Graphic3d_GraphicDriver.
// En effet, ce nom est recherche par la methode DlSymb de la
// classe OSD_SharedLibrary dans la methode SetGraphicDriver de la
// classe Graphic3d_GraphicDevice
extern "C" {
#ifdef _MSC_VER /* disable MS VC++ warning on C-style function returning C++ object */
#pragma warning(push)
#pragma warning(disable:4190)
#endif
  Standard_EXPORT Handle(Graphic3d_GraphicDriver) MetaGraphicDriverFactory
    (const Standard_CString AShrName);
  Standard_EXPORT Handle(Graphic3d_GraphicDriver) MetaGraphicDriverFactory
    (const Standard_CString AShrName) {
      Handle(OpenGl_GraphicDriver)  aOpenDriver = new OpenGl_GraphicDriver (AShrName);
      return aOpenDriver;
      //              return new OpenGl_GraphicDriver (AShrName);
    }
#ifdef _MSC_VER
#pragma warning(pop)
#endif
}

//-Constructors

OpenGl_GraphicDriver::OpenGl_GraphicDriver (const Standard_CString AShrName):Graphic3d_GraphicDriver (AShrName) 
{
}

//-Methods, in order

Standard_ShortReal OpenGl_GraphicDriver::DefaultTextHeight() const
{
  return 16.;
}

GLboolean OpenGl_QueryExtensionGLX (const char *extName)
{
  return QueryExtensionGLX(extName);
}

GLboolean OpenGl_QueryExtension    (const char *extName)
{
  return QueryExtension(extName);
}