00001
00002
00003
00004
00005
00006 #include "pandagl.h"
00007
00008 #include "config_glgsg.h"
00009
00010 #ifdef HAVE_WGL
00011 #include "config_wgldisplay.h"
00012 #include "wglGraphicsPipe.h"
00013 #endif
00014
00015 #ifdef IS_OSX
00016 #include "config_osxdisplay.h"
00017 #include "osxGraphicsPipe.h"
00018 #endif
00019
00020 #ifdef HAVE_GLX
00021 #include "config_glxdisplay.h"
00022 #include "glxGraphicsPipe.h"
00023 #endif
00024
00025 #if !defined(HAVE_WGL) && !defined(IS_OSX) && !defined(HAVE_GLX)
00026 #error One of HAVE_WGL, IS_OSX or HAVE_GLX must be defined when compiling pandagl!
00027 #endif
00028
00029
00030
00031
00032
00033 #include "checkPandaVersion.h"
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 void
00044 init_libpandagl() {
00045 init_libglgsg();
00046
00047 #ifdef HAVE_WGL
00048 init_libwgldisplay();
00049 #endif // HAVE_GL
00050
00051 #ifdef IS_OSX
00052 init_libosxdisplay();
00053 #endif
00054
00055 #ifdef IS_LINUX
00056 init_libglxdisplay();
00057 #endif
00058 }
00059
00060
00061
00062
00063
00064
00065 int
00066 get_pipe_type_pandagl() {
00067 #ifdef HAVE_WGL
00068 return wglGraphicsPipe::get_class_type().get_index();
00069 #endif
00070
00071 #ifdef IS_OSX
00072 return osxGraphicsPipe::get_class_type().get_index();
00073 #endif
00074
00075 #ifdef HAVE_GLX
00076 return glxGraphicsPipe::get_class_type().get_index();
00077 #endif
00078
00079 return 0;
00080 }