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 * スプライトピクチャRGB8ヘッダ 00022 * @author Junpee 00023 */ 00024 00025 #ifndef SPRITE_PICTURE_RGB8_H_ 00026 #define SPRITE_PICTURE_RGB8_H_ 00027 00028 #include <Graphics2D/Sprite/SpritePicture.h> 00029 00030 namespace Lamp{ 00031 00032 //------------------------------------------------------------------------------ 00033 /** 00034 * スプライトピクチャRGB8 00035 */ 00036 class SpritePictureRGB8 : public SpritePicture{ 00037 public: 00038 //-------------------------------------------------------------------------- 00039 // 生成、破棄 00040 //-------------------------------------------------------------------------- 00041 /** 00042 * コンストラクタ 00043 */ 00044 SpritePictureRGB8(); 00045 00046 /** 00047 * デストラクタ 00048 */ 00049 virtual ~SpritePictureRGB8(); 00050 00051 //-------------------------------------------------------------------------- 00052 // サイズ 00053 //-------------------------------------------------------------------------- 00054 /** 00055 * サイズの設定 00056 * @param size サイズ 00057 */ 00058 virtual void setSize(const DimensionI& size); 00059 00060 //-------------------------------------------------------------------------- 00061 // イメージ 00062 //-------------------------------------------------------------------------- 00063 /** 00064 * イメージバッファの取得 00065 * @return イメージバッファ 00066 */ 00067 virtual Color3c* getImageBuffer(){ return image_; } 00068 00069 protected: 00070 //-------------------------------------------------------------------------- 00071 // Direct3Dテクスチャ 00072 //-------------------------------------------------------------------------- 00073 /** 00074 * D3Dテクスチャのコンパイル 00075 * @return 成功すればtrueを返す 00076 */ 00077 virtual bool compileD3DTexture(); 00078 00079 /** 00080 * イメージのコンパイル 00081 */ 00082 virtual bool compileImage( 00083 const Color3c* image, const DimensionI& size, int mipmapLevel); 00084 00085 /** 00086 * ミップマップのコンパイル 00087 */ 00088 virtual bool compileMipmap( 00089 const Color3c* image, const DimensionI& size, int mipmapLevel); 00090 00091 private: 00092 //-------------------------------------------------------------------------- 00093 // イメージ 00094 Color3c* image_; 00095 00096 }; 00097 00098 //------------------------------------------------------------------------------ 00099 } // End of namespace Lamp 00100 #endif // End of SPRITE_PICTURE_RGB8_H_ 00101 //------------------------------------------------------------------------------