uniform.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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