00001 // Filename: config_palettizer.cxx 00002 // Created by: drose (12Sep03) 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_palettizer.h" 00016 #include "palettizer.h" 00017 #include "eggFile.h" 00018 #include "paletteGroup.h" 00019 #include "paletteGroups.h" 00020 #include "textureReference.h" 00021 #include "textureProperties.h" 00022 #include "imageFile.h" 00023 #include "sourceTextureImage.h" 00024 #include "destTextureImage.h" 00025 #include "textureImage.h" 00026 #include "paletteImage.h" 00027 #include "texturePlacement.h" 00028 #include "texturePosition.h" 00029 #include "palettePage.h" 00030 00031 #include "dconfig.h" 00032 00033 Configure(config_palettizer); 00034 00035 ConfigureFn(config_palettizer) { 00036 init_palettizer(); 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: init_libpalettizer 00041 // Description: Initializes the library. This must be called at 00042 // least once before any of the functions or classes in 00043 // this library can be used. Normally it will be 00044 // called by the static initializers and need not be 00045 // called explicitly, but special cases exist. 00046 //////////////////////////////////////////////////////////////////// 00047 void 00048 init_palettizer() { 00049 static bool initialized = false; 00050 if (initialized) { 00051 return; 00052 } 00053 initialized = true; 00054 00055 Palettizer::init_type(); 00056 EggFile::init_type(); 00057 PaletteGroup::init_type(); 00058 PaletteGroups::init_type(); 00059 TextureReference::init_type(); 00060 TextureProperties::init_type(); 00061 ImageFile::init_type(); 00062 SourceTextureImage::init_type(); 00063 DestTextureImage::init_type(); 00064 TextureImage::init_type(); 00065 PaletteImage::init_type(); 00066 TexturePlacement::init_type(); 00067 TexturePosition::init_type(); 00068 PalettePage::init_type(); 00069 00070 // Registration of writable object's creation functions with 00071 // BamReader's factory 00072 Palettizer::register_with_read_factory(); 00073 EggFile::register_with_read_factory(); 00074 PaletteGroup::register_with_read_factory(); 00075 PaletteGroups::register_with_read_factory(); 00076 TextureReference::register_with_read_factory(); 00077 TextureProperties::register_with_read_factory(); 00078 SourceTextureImage::register_with_read_factory(); 00079 DestTextureImage::register_with_read_factory(); 00080 TextureImage::register_with_read_factory(); 00081 PaletteImage::register_with_read_factory(); 00082 TexturePlacement::register_with_read_factory(); 00083 TexturePosition::register_with_read_factory(); 00084 PalettePage::register_with_read_factory(); 00085 }