Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# KeosShader.h

Go to the documentation of this file.

    00001 /*
    00002  * This source file is part of KEOS (Free 3D Engine)
    00003  * For the latest info, see http://www.keosengine.org/
    00004  * E-mails : thierry.vouriot@keosengine.org, yeri@keosengine.org
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it under
    00007  * the terms of the GNU Lesser General Public License as published by the Free Software
    00008  * Foundation; either version 2 of the License, or (at your option) any later
    00009  * version.
    00010  *
    00011  * This program is distributed in the hope that it will be useful, but WITHOUT
    00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00013  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00014  *
    00015  * You should have received a copy of the GNU Lesser General Public License along with
    00016  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00017  * Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00018  * http://www.gnu.org/copyleft/lesser.txt.
    00019  *
    00020  */
    00021 #ifndef KEOS_SHADER_H
    00022 #define KEOS_SHADER_H
    00023
    00024 #include "KeosPrerequisites.h"
    00025 #include "KeosShaderBase.h"
    00026
    00027 namespace Keos
    00028 {
    00029     //-----------------------------------------------------------------------
    00033     class KEOS_EXPORT CShader
    00034     {
    00035     public :
    00036
    00040         void LoadFromFile(const String& strFilename);
    00041
    00044         void Unload();
    00045
    00049         const IShaderBase* GetShader() const;
    00050
    00055         void SetParameter(const String& strName, float fValue);
    00056
    00061         void SetParameter(const String& strName, const TVector2F& Value);
    00062
    00063
    00068         void SetParameter(const String& strName, const TVector3F& Value);
    00069
    00074         void SetParameter(const String& strName, const TVector4F& Value);
    00075
    00076
    00081         void SetParameter(const String& strName, const CMatrix4& Value);
    00082
    00087         void SetParameter(const String& strName, const CColor& Value);
    00088
    00089     private :
    00090
    00092         CSmartPtr<IShaderBase, CCOMRefCounted> m_Shader;
    00093     };
    00094
    00095 } // namespace Keos
    00096
    00097
    00098 #endif // KEOS_SHADER_H