Added a lot of methods to send uniforms

including arrays and integers vectors


Former-commit-id: c365cccdbad7eab1a1212e78759d7fda857012f9
This commit is contained in:
Lynix
2013-09-16 01:01:59 +02:00
parent f0eac2bc0d
commit 15fa8378c9
6 changed files with 597 additions and 0 deletions

View File

@@ -47,17 +47,32 @@ class NzGLSLProgram : public NzAbstractShaderProgram, NzResourceListener
bool SendBoolean(int location, bool value);
bool SendColor(int location, const NzColor& color);
bool SendDouble(int location, double value);
bool SendDoubleArray(int location, const double* values, unsigned int count);
bool SendFloat(int location, float value);
bool SendFloatArray(int location, const float* values, unsigned int count);
bool SendInteger(int location, int value);
bool SendIntegerArray(int location, const int* values, unsigned int count);
bool SendMatrix(int location, const NzMatrix4d& matrix);
bool SendMatrix(int location, const NzMatrix4f& matrix);
bool SendTexture(int location, const NzTexture* texture, nzUInt8* textureUnit = nullptr);
bool SendVector(int location, const NzVector2d& vector);
bool SendVector(int location, const NzVector2f& vector);
bool SendVector(int location, const NzVector2i& vector);
bool SendVector(int location, const NzVector3d& vector);
bool SendVector(int location, const NzVector3f& vector);
bool SendVector(int location, const NzVector3i& vector);
bool SendVector(int location, const NzVector4d& vector);
bool SendVector(int location, const NzVector4f& vector);
bool SendVector(int location, const NzVector4i& vector);
bool SendVectorArray(int location, const NzVector2d* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector2f* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector2i* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector3d* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector3f* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector3i* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector4d* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector4f* vectors, unsigned int count);
bool SendVectorArray(int location, const NzVector4i* vectors, unsigned int count);
private:
bool OnResourceCreated(const NzResource* resource, int index) override;