uniform.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 __uniform__header__
00034 #define __uniform__header__
00035 
00036 
00037 #include "gpucalc/gpu_resource.h"
00038 
00039 
00040 namespace gpucalc
00041 {
00042 
00043 
00047  class _GpuCalcExport Uniform: public GPUResource
00048  {
00049 
00050   OBJ_DISABLE_COPY(Uniform)
00051   
00052   
00053   public:
00054 
00055 
00056    enum UniformType
00057    {
00058     UT_NOT_UNIFORM = 0,
00059 
00060     UT_TEX_1,
00061     UT_TEX_2,
00062 
00063     UT_INT_1,
00064     UT_INT_2,
00065     UT_INT_3,
00066     UT_INT_4,
00067 
00068     UT_BOOL_1,
00069     UT_BOOL_2,
00070     UT_BOOL_3,
00071     UT_BOOL_4,
00072 
00073     UT_FLOAT_1,
00074     UT_FLOAT_2,
00075     UT_FLOAT_3,
00076     UT_FLOAT_4,
00077 
00078     UT_MAT_2X2,
00079     UT_MAT_3X3,
00080     UT_MAT_4X4
00081    };
00082 
00083 
00084    Uniform(const std::string & UniformClassName, const std::string & UniformName): Object(UniformClassName, UniformName),
00085     GPUResource(UniformClassName, UniformName)
00086    {
00087    }
00088 
00089 
00090    virtual ~Uniform()
00091    {
00092    }
00093 
00094 
00095    virtual Uniform::UniformType getUniformType() const = 0;
00096 
00097 
00098    virtual void * pointer() const = 0;
00099 
00100 
00101    virtual Texture * getSampler() const = 0;
00102  };
00103 }
00104 
00105 
00106 #endif

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