Panda3D
Loading...
Searching...
No Matches
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#ifdef HAVE_EGL
30#include "config_egldisplay.h"
31#include "eglGraphicsPipe.h"
32#endif
33
34#if !defined(HAVE_WGL) && !defined(HAVE_COCOA) && !defined(HAVE_CARBON) && !defined(HAVE_GLX) && !defined(HAVE_EGL)
35#error One of HAVE_WGL, HAVE_COCOA, HAVE_CARBON, HAVE_GLX or HAVE_EGL must be defined when compiling pandagl!
36#endif
37
38/**
39 * Initializes the library. This must be called at least once before any of
40 * the functions or classes in this library can be used. Normally it will be
41 * called by the static initializers and need not be called explicitly, but
42 * special cases exist.
43 */
44void
47
48#ifdef HAVE_WGL
50#endif // HAVE_GL
51
52#if defined(HAVE_COCOA)
53 init_libcocoadisplay();
54#elif defined(HAVE_CARBON)
56#endif
57
58#ifdef HAVE_GLX
60#endif
61
62#ifdef HAVE_EGL
64#endif
65}
66
67/**
68 * Returns the TypeHandle index of the recommended graphics pipe type defined
69 * by this module.
70 */
71int
73#ifdef HAVE_WGL
74 return wglGraphicsPipe::get_class_type().get_index();
75#endif
76
77#if defined(HAVE_COCOA)
78 return CocoaGraphicsPipe::get_class_type().get_index();
79#elif defined(HAVE_CARBON)
80 return osxGraphicsPipe::get_class_type().get_index();
81#endif
82
83#ifdef HAVE_GLX
84 return glxGraphicsPipe::get_class_type().get_index();
85#endif
86
87#ifdef HAVE_EGL
88 return eglGraphicsPipe::get_class_type().get_index();
89#endif
90
91 return 0;
92}
93
94#if defined(HAVE_EGL) && !defined(USE_X11)
95int
96get_pipe_type_p3headlessgl() {
97 return eglGraphicsPipe::get_class_type().get_index();
98}
99#endif
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_libegldisplay()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libglgsg()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libglxdisplay()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libosxdisplay()
Initializes the library.
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.
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:72
void init_libpandagl()
Initializes the library.
Definition pandagl.cxx:45
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.