Panda3D
 All Classes Functions Variables Enumerations
texturePoolFilter.cxx
00001 // Filename: texturePoolFilter.cxx
00002 // Created by:  drose (27Jul06)
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 "texturePoolFilter.h"
00016 
00017 TypeHandle TexturePoolFilter::_type_handle;
00018 
00019 ////////////////////////////////////////////////////////////////////
00020 //     Function: TexturePoolFilter::Destructor
00021 //       Access: Public, Virtual
00022 //  Description: 
00023 ////////////////////////////////////////////////////////////////////
00024 TexturePoolFilter::
00025 ~TexturePoolFilter() {
00026 }
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //     Function: TexturePoolFilter::pre_load
00030 //       Access: Public, Virtual
00031 //  Description: This method is called before each texture is loaded
00032 //               from disk, via the TexturePool, for the first time.
00033 //               If this method returns NULL, then a new Texture will
00034 //               be allocated and loaded from disk normally by the
00035 //               TexturePool; otherwise, if it returns non-NULL, then
00036 //               that returned pointer will be used as the Texture for
00037 //               this filename.
00038 ////////////////////////////////////////////////////////////////////
00039 PT(Texture) TexturePoolFilter::
00040 pre_load(const Filename &, const Filename &, int, int, bool,
00041          const LoaderOptions &) {
00042   return NULL;
00043 }
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 //     Function: TexturePoolFilter::post_load
00047 //       Access: Public, Virtual
00048 //  Description: This method is called after each texture has been
00049 //               loaded from disk, via the TexturePool, for the first
00050 //               time.  By the time this method is called, the Texture
00051 //               has already been fully read from disk.  This method
00052 //               should return the Texture pointer that the
00053 //               TexturePool should actually return (usually it is the
00054 //               same as the pointer supplied).
00055 ////////////////////////////////////////////////////////////////////
00056 PT(Texture) TexturePoolFilter::
00057 post_load(Texture *tex) {
00058   return tex;
00059 }
00060 
00061 ////////////////////////////////////////////////////////////////////
00062 //     Function: TexturePoolFilter::output
00063 //       Access: Public, Virtual
00064 //  Description: 
00065 ////////////////////////////////////////////////////////////////////
00066 void TexturePoolFilter::
00067 output(ostream &out) const {
00068   out << get_type();
00069 }
 All Classes Functions Variables Enumerations