Panda3D
pandagl.cxx
Go to the documentation of this file.
1 /**
2  * @file pandagl.cxx
3  * @author drose
4  * @date 2000-05-15
5  */
6 
7 #include "pandagl.h"
8 
9 #include "config_glgsg.h"
10 
11 #ifdef HAVE_WGL
12 #include "config_wgldisplay.h"
13 #include "wglGraphicsPipe.h"
14 #endif
15 
16 #if defined(HAVE_COCOA)
17 #include "config_cocoadisplay.h"
18 #include "cocoaGraphicsPipe.h"
19 #elif defined(HAVE_CARBON)
20 #include "config_osxdisplay.h"
21 #include "osxGraphicsPipe.h"
22 #endif
23 
24 #ifdef HAVE_GLX
25 #include "config_glxdisplay.h"
26 #include "glxGraphicsPipe.h"
27 #endif
28 
29 #if !defined(HAVE_WGL) && !defined(HAVE_COCOA) && !defined(HAVE_CARBON) && !defined(HAVE_GLX)
30 #error One of HAVE_WGL, HAVE_COCOA, HAVE_CARBON or HAVE_GLX must be defined when compiling pandagl!
31 #endif
32 
33 /**
34  * Initializes the library. This must be called at least once before any of
35  * the functions or classes in this library can be used. Normally it will be
36  * called by the static initializers and need not be called explicitly, but
37  * special cases exist.
38  */
39 void
41  init_libglgsg();
42 
43 #ifdef HAVE_WGL
45 #endif // HAVE_GL
46 
47 #if defined(HAVE_COCOA)
48  init_libcocoadisplay();
49 #elif defined(HAVE_CARBON)
51 #endif
52 
53 #ifdef IS_LINUX
55 #endif
56 }
57 
58 /**
59  * Returns the TypeHandle index of the recommended graphics pipe type defined
60  * by this module.
61  */
62 int
64 #ifdef HAVE_WGL
65  return wglGraphicsPipe::get_class_type().get_index();
66 #endif
67 
68 #if defined(HAVE_COCOA)
69  return CocoaGraphicsPipe::get_class_type().get_index();
70 #elif defined(HAVE_CARBON)
71  return osxGraphicsPipe::get_class_type().get_index();
72 #endif
73 
74 #ifdef HAVE_GLX
75  return glxGraphicsPipe::get_class_type().get_index();
76 #endif
77 
78  return 0;
79 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libwgldisplay()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_pipe_type_pandagl()
Returns the TypeHandle index of the recommended graphics pipe type defined by this module.
Definition: pandagl.cxx:63
get_index
Returns the integer index associated with this TypeHandle.
Definition: typeHandle.h:135
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libosxdisplay()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libglxdisplay()
Initializes the library.
void init_libglgsg()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libpandagl()
Initializes the library.
Definition: pandagl.cxx:40