00001 // Filename: pandagles.cxx 00002 // Created by: pro-rsoft (8Jun09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 00006 #include "pandagles.h" 00007 00008 #define OPENGLES_1 00009 #include "config_glesgsg.h" 00010 00011 #ifdef HAVE_EGL 00012 #include "config_egldisplay.h" 00013 #include "eglGraphicsPipe.h" 00014 #endif 00015 00016 // By including checkPandaVersion.h, we guarantee that runtime 00017 // attempts to load libpandagles.so/.dll will fail if they inadvertently 00018 // link with the wrong version of libdtool.so/.dll. 00019 00020 #include "checkPandaVersion.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Function: init_libpandagles 00024 // Description: Initializes the library. This must be called at 00025 // least once before any of the functions or classes in 00026 // this library can be used. Normally it will be 00027 // called by the static initializers and need not be 00028 // called explicitly, but special cases exist. 00029 //////////////////////////////////////////////////////////////////// 00030 void 00031 init_libpandagles() { 00032 init_libglesgsg(); 00033 00034 #ifdef HAVE_EGL 00035 init_libegldisplay(); 00036 #endif 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: get_pipe_type_pandagles 00041 // Description: Returns the TypeHandle index of the recommended 00042 // graphics pipe type defined by this module. 00043 //////////////////////////////////////////////////////////////////// 00044 int 00045 get_pipe_type_pandagles() { 00046 #ifdef HAVE_EGL 00047 return eglGraphicsPipe::get_class_type().get_index(); 00048 #endif 00049 00050 return 0; 00051 }