shader_system.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008 by Kutumov Alexey                                  *
00003  *   ru.pixel@gmail.com                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program 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         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00033 #ifndef __shader_system__header__
00034 #define __shader_system__header__
00035 
00036 #include "gpucalc/object.h"
00037 
00038 namespace gpucalc
00039 {
00040 
00041 
00042  const char _ShaderSystemClassName [] = "ShaderSystem";
00043 
00044 
00054  class _GpuCalcExport ShaderSystem: public Object
00055  {
00056 
00057 
00058   OBJ_DISABLE_COPY(ShaderSystem)
00059   
00060   
00061   
00062   public:
00063    ShaderSystem(const std::string & ShaderSystemName);
00064 
00065 
00066    virtual ~ShaderSystem();
00067 
00068 
00074    virtual Shader * create(const std::string & ShaderName) = 0;
00075 
00076 
00077    virtual Shader * getShaderByName(const std::string & ShaderName) const = 0;
00078 
00079 
00080    virtual bool isShaderCreated(const std::string & ShaderName) const = 0;
00081 
00082 
00083             virtual bool preCompile(const std::string & ShaderName, const std::string & ShaderSource, const std::string & Parameters = "");
00084 
00085 
00086 
00092    virtual Uniform * create(const Data & data) = 0;
00093 
00094 
00100    virtual Uniform * create(Texture * texture) = 0;
00101 
00102 
00103    virtual Uniform * getUniformByName(const std::string & UniformName) const = 0;
00104 
00105 
00106    virtual bool isUniformCreated(const std::string & UniformName) const = 0;
00107 
00108 
00114    virtual void destroy(Uniform * uniform) = 0;
00115 
00116 
00122    virtual void destroy(Shader * shader) = 0;
00123 
00124 
00125    virtual void bind(Shader * shader) = 0;
00126 
00127 
00128    virtual void unbind(Shader * shader) = 0;
00129 
00130 
00131    virtual Shader * getActiveShader() const = 0;
00132 
00133 
00140    virtual bool isAcceptCore(const GraphicCore * Core) const = 0;
00141 
00142 
00146    virtual void start() = 0;
00147 
00148 
00152    virtual void stop() = 0;
00153 
00154 
00158    virtual bool isAcceptFileExtension(const std::string & FileExtension) const = 0;
00159 
00160 
00166    virtual void addAcceptableGraphicCoreID(const std::string & GraphicCoreID) = 0;
00167 
00168 
00172    virtual debugger::CodeInstructor * getCodeInstructor() const = 0;
00173  };
00174 }
00175 
00176 #endif

Generated on Thu Mar 5 22:36:42 2009 for gpucalc by  doxygen 1.5.6