Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# ShaderManager.h

Go to the documentation of this file.

    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 SHADER_MANAGER_H_
    00026 #define SHADER_MANAGER_H_
    00027
    00028 namespace Lamp{
    00029
    00030 class BasicShaderFixed;
    00031
    00032 //------------------------------------------------------------------------------
    00033 /**
    00034  * シェーダマネージャ
    00035  */
    00036 class ShaderManager{
    00037 friend class LampGraphics;
    00038 public:
    00039     //--------------------------------------------------------------------------
    00040     /**
    00041      * インスタンス取得
    00042      * @return インスタンス
    00043      */
    00044     static ShaderManager* getInstance(){
    00045         Assert(instance_ != NULL);
    00046         return instance_;
    00047     }
    00048
    00049     //--------------------------------------------------------------------------
    00050     /**
    00051      * 基本シェーダ固定パイプラインの取得
    00052      * @return 基本シェーダ固定パイプライン
    00053      */
    00054     BasicShaderFixed* getBasicShaderFixed() const{ return basicShaderFixed_; }
    00055
    00056     //--------------------------------------------------------------------------
    00057 protected:
    00058     /**
    00059      * コンストラクタ
    00060      */
    00061     ShaderManager();
    00062
    00063     /**
    00064      * デストラクタ
    00065      */
    00066     ~ShaderManager();
    00067
    00068     /// 基本シェーダ固定パイプライン
    00069     BasicShaderFixed* basicShaderFixed_;
    00070
    00071     //--------------------------------------------------------------------------
    00072 private:
    00073     // コピーコンストラクタの隠蔽
    00074     ShaderManager(const ShaderManager& copy);
    00075
    00076     // 代入コピーの隠蔽
    00077     void operator =(const ShaderManager& copy);
    00078
    00079     // インスタンス
    00080     static ShaderManager* instance_;
    00081
    00082 };
    00083
    00084 //------------------------------------------------------------------------------
    00085 } // End of namespace Lamp
    00086 #endif // End of SHADER_MANAGER_H_
    00087 //------------------------------------------------------------------------------