Panda3D
 All Classes Functions Variables Enumerations
config_assimp.cxx
00001 // Filename: config_assimp.cxx
00002 // Created by:  rdb (29Mar11)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "config_assimp.h"
00016 
00017 #include "loaderFileTypeAssimp.h"
00018 
00019 #include "dconfig.h"
00020 #include "loaderFileTypeRegistry.h"
00021 
00022 ConfigureDef(config_assimp);
00023 NotifyCategoryDef(assimp, "");
00024 
00025 ConfigureFn(config_assimp) {
00026   init_libassimp();
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: init_libassimp
00031 //  Description: Initializes the library.  This must be called at
00032 //               least once before any of the functions or classes in
00033 //               this library can be used.  Normally it will be
00034 //               called by the static initializers and need not be
00035 //               called explicitly, but special cases exist.
00036 ////////////////////////////////////////////////////////////////////
00037 void
00038 init_libassimp() {
00039   static bool initialized = false;
00040   if (initialized) {
00041     return;
00042   }
00043   initialized = true;
00044 
00045   LoaderFileTypeAssimp::init_type();
00046 
00047   LoaderFileTypeRegistry *reg = LoaderFileTypeRegistry::get_global_ptr();
00048   reg->register_type(new LoaderFileTypeAssimp);
00049 }
 All Classes Functions Variables Enumerations