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
00021
00022
00023 #ifndef __PLRENDERER_PROGRAMUNIFORM_H__
00024 #define __PLRENDERER_PROGRAMUNIFORM_H__
00025 #pragma once
00026
00027
00028
00029
00030
00031 #include "PLRenderer/PLRenderer.h"
00032
00033
00034
00035
00036
00037 namespace PLMath {
00038 class Vector2;
00039 class Vector2i;
00040 class Vector3;
00041 class Vector3i;
00042 class Vector4;
00043 class Matrix3x3;
00044 class Matrix3x4;
00045 class Matrix4x4;
00046 class Quaternion;
00047 }
00048 namespace PLGraphics {
00049 class Color3;
00050 class Color4;
00051 }
00052 namespace PLRenderer {
00053 class TextureBuffer;
00054 }
00055
00056
00057
00058
00059
00060 namespace PLRenderer {
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 class ProgramUniform {
00091
00092
00093
00094
00095
00096 public:
00097
00098
00099
00100 virtual void Get(int &nX) = 0;
00101 virtual void Get(float &fX) = 0;
00102 virtual void Get(double &fX) = 0;
00103 virtual void Set(int nX) = 0;
00104 virtual void Set(float fX) = 0;
00105 virtual void Set(double fX) = 0;
00106
00107
00108
00109
00110
00111 virtual void Get(int &nX, int &nY) = 0;
00112 virtual void Get(float &fX, float &fY) = 0;
00113 virtual void Get(double &fX, double &fY) = 0;
00114 virtual void Get(PLMath::Vector2i &vVector) = 0;
00115 virtual void Get(PLMath::Vector2 &vVector) = 0;
00116 virtual void Get2(int *pnComponents) = 0;
00117 virtual void Get2(float *pfComponents) = 0;
00118 virtual void Get2(double *pfComponents) = 0;
00119 virtual void Set(int nX, int nY) = 0;
00120 virtual void Set(float fX, float fY) = 0;
00121 virtual void Set(double fX, double fY) = 0;
00122 virtual void Set(const PLMath::Vector2i &vVector) = 0;
00123 virtual void Set(const PLMath::Vector2 &vVector) = 0;
00124 virtual void Set2(const int *pnComponents) = 0;
00125 virtual void Set2(const float *pfComponents) = 0;
00126 virtual void Set2(const double *pfComponents) = 0;
00127
00128
00129
00130
00131
00132 virtual void Get(int &nX, int &nY, int &nZ) = 0;
00133 virtual void Get(float &fX, float &fY, float &fZ) = 0;
00134 virtual void Get(double &fX, double &fY, double &fZ) = 0;
00135 virtual void Get(PLMath::Vector3i &vVector) = 0;
00136 virtual void Get(PLMath::Vector3 &vVector) = 0;
00137 virtual void Get(PLGraphics::Color3 &cColor) = 0;
00138 virtual void Get3(int *pnComponents) = 0;
00139 virtual void Get3(float *pfComponents) = 0;
00140 virtual void Get3(double *pfComponents) = 0;
00141 virtual void Set(int nX, int nY, int nZ) = 0;
00142 virtual void Set(float fX, float fY, float fZ) = 0;
00143 virtual void Set(double fX, double fY, double fZ) = 0;
00144 virtual void Set(const PLMath::Vector3i &vVector) = 0;
00145 virtual void Set(const PLMath::Vector3 &vVector) = 0;
00146 virtual void Set(const PLGraphics::Color3 &cColor) = 0;
00147 virtual void Set3(const int *pnComponents) = 0;
00148 virtual void Set3(const float *pfComponents) = 0;
00149 virtual void Set3(const double *pfComponents) = 0;
00150
00151
00152
00153
00154
00155 virtual void Get(int &nX, int &nY, int &nZ, int &nW) = 0;
00156 virtual void Get(float &fX, float &fY, float &fZ, float &fW) = 0;
00157 virtual void Get(double &fX, double &fY, double &fZ, double &fW) = 0;
00158 virtual void Get(PLMath::Vector4 &vVector) = 0;
00159 virtual void Get(PLGraphics::Color4 &cColor) = 0;
00160 virtual void Get(PLMath::Quaternion &qQuaternion) = 0;
00161 virtual void Get4(int *pnComponents) = 0;
00162 virtual void Get4(float *pfComponents) = 0;
00163 virtual void Get4(double *pfComponents) = 0;
00164 virtual void Set(int nX, int nY, int nZ, int nW) = 0;
00165 virtual void Set(float fX, float fY, float fZ, float fW) = 0;
00166 virtual void Set(double fX, double fY, double fZ, double fW) = 0;
00167 virtual void Set(const PLMath::Vector4 &vVector) = 0;
00168 virtual void Set(const PLGraphics::Color4 &cColor) = 0;
00169 virtual void Set(const PLMath::Quaternion &qQuaternion) = 0;
00170 virtual void Set4(const int *pnComponents) = 0;
00171 virtual void Set4(const float *pfComponents) = 0;
00172 virtual void Set4(const double *pfComponents) = 0;
00173
00174
00175
00176
00177
00178 virtual void Get(PLMath::Matrix3x3 &mMatrix) = 0;
00179 virtual void Get(PLMath::Matrix4x4 &mMatrix) = 0;
00180 virtual void Set(const PLMath::Matrix3x3 &mMatrix, bool bTranspose = false) = 0;
00181 virtual void Set(const PLMath::Matrix4x4 &mMatrix, bool bTranspose = false) = 0;
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194 virtual int GetTextureUnit() const = 0;
00195
00196
00197
00198
00199
00200
00201
00202
00203 virtual int Set(TextureBuffer *pTextureBuffer) = 0;
00204
00205
00206
00207
00208
00209 protected:
00210
00211
00212
00213
00214 PLRENDERER_API ProgramUniform();
00215
00216
00217
00218
00219
00220 PLRENDERER_API virtual ~ProgramUniform();
00221
00222
00223
00224
00225
00226 private:
00227
00228
00229
00230
00231
00232
00233
00234 ProgramUniform(const ProgramUniform &cSource);
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246 ProgramUniform &operator =(const ProgramUniform &cSource);
00247
00248
00249 };
00250
00251
00252
00253
00254
00255 }
00256
00257
00258 #endif // __PLRENDERER_PROGRAMUNIFORM_H__