00001 //------------------------------------------------------------------------------ 00002 // Lamp : Open source game middleware 00003 // Copyright (C) 2004 Junpei Ohtani ( Email : junpee@users.sourceforge.jp ) 00004 // 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 //------------------------------------------------------------------------------ 00019 00020 /** @file 00021 * ピクチャマネージャヘッダ 00022 * @author Junpee 00023 */ 00024 00025 #ifndef PICTURE_MANAGER_H_ 00026 #define PICTURE_MANAGER_H_ 00027 00028 #include <Graphics/Scene/SceneObjectManagerTemplate.h> 00029 #include <Graphics/System/GraphicsDeviceObjectHolder.h> 00030 #include <Graphics/Picture/PictureRGB8.h> 00031 #include <Graphics/Picture/PictureRGBA8.h> 00032 00033 namespace Lamp{ 00034 //------------------------------------------------------------------------------ 00035 /** 00036 * ピクチャマネージャ 00037 */ 00038 class PictureManager : public SceneObjectManagerTemplate<Picture>, 00039 public GraphicsDeviceObjectHolder{ 00040 friend class Scene; 00041 public: 00042 /** 00043 * RGB8ビットピクチャの作成 00044 * 00045 * すでに同じピクチャ名のピクチャが存在するとエラーになります。 00046 * 空文字列を名前に指定するとエラーになります。 00047 * @param pictureName ピクチャ名 00048 * @return 作成されたピクチャ 00049 */ 00050 virtual PictureRGB8* createPictureRGB8(const String& pictureName); 00051 00052 /** 00053 * RGBA8ビットピクチャの作成 00054 * 00055 * すでに同じピクチャ名のピクチャが存在するとエラーになります。 00056 * 空文字列を名前に指定するとエラーになります。 00057 * @param pictureName ピクチャ名 00058 * @return 作成されたピクチャ 00059 */ 00060 virtual PictureRGBA8* createPictureRGBA8(const String& pictureName); 00061 00062 //-------------------------------------------------------------------------- 00063 /** 00064 * デバイスオブジェクトの初期化 00065 * @return 成功したらtrueを返す 00066 */ 00067 virtual bool initializeGraphicsDeviceObjects(); 00068 00069 /** 00070 * デバイスオブジェクトの削除 00071 */ 00072 virtual void deleteGraphicsDeviceObjects(); 00073 00074 /** 00075 * デバイスオブジェクトのリストア 00076 * @return 成功したらtrueを返す 00077 */ 00078 virtual bool restoreGraphicsDeviceObjects(); 00079 00080 /** 00081 * デバイスオブジェクトの無効化 00082 */ 00083 virtual void invalidateGraphicsDeviceObjects(); 00084 00085 protected: 00086 /** 00087 * コンストラクタ 00088 * @param scene シーン 00089 */ 00090 PictureManager(Scene* scene); 00091 00092 }; 00093 00094 //------------------------------------------------------------------------------ 00095 } // End of namespace Lamp 00096 #endif // End of PICTURE_MANAGER_H_ 00097 //------------------------------------------------------------------------------