It is now possible to use const shaders
A non-constant shader is no longer required to bind or to send uniform Former-commit-id: 8fd7c03b65a2d9fcea69516c023fee034299148c
This commit is contained in:
@@ -44,7 +44,7 @@ class NAZARA_API NzRenderer
|
||||
static unsigned int GetMaxRenderTargets();
|
||||
static unsigned int GetMaxTextureUnits();
|
||||
static float GetPointSize();
|
||||
static NzShader* GetShader();
|
||||
static const NzShader* GetShader();
|
||||
static NzRenderTarget* GetTarget();
|
||||
static NzRectui GetViewport();
|
||||
|
||||
@@ -67,7 +67,7 @@ class NAZARA_API NzRenderer
|
||||
static void SetLineWidth(float size);
|
||||
static void SetMatrix(nzMatrixType type, const NzMatrix4f& matrix);
|
||||
static void SetPointSize(float size);
|
||||
static bool SetShader(NzShader* shader);
|
||||
static bool SetShader(const NzShader* shader);
|
||||
static void SetStencilCompareFunction(nzRendererComparison compareFunc);
|
||||
static void SetStencilFailOperation(nzStencilOperation failOperation);
|
||||
static void SetStencilMask(nzUInt32 mask);
|
||||
|
||||
@@ -51,20 +51,20 @@ class NAZARA_API NzShader : public NzResource, NzNonCopyable
|
||||
|
||||
bool Lock();
|
||||
|
||||
bool SendBoolean(int location, bool value);
|
||||
bool SendColor(int location, const NzColor& color);
|
||||
bool SendDouble(int location, double value);
|
||||
bool SendFloat(int location, float value);
|
||||
bool SendInteger(int location, int value);
|
||||
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 NzVector3d& vector);
|
||||
bool SendVector(int location, const NzVector3f& vector);
|
||||
bool SendVector(int location, const NzVector4d& vector);
|
||||
bool SendVector(int location, const NzVector4f& vector);
|
||||
bool SendBoolean(int location, bool value) const;
|
||||
bool SendColor(int location, const NzColor& color) const;
|
||||
bool SendDouble(int location, double value) const;
|
||||
bool SendFloat(int location, float value) const;
|
||||
bool SendInteger(int location, int value) const;
|
||||
bool SendMatrix(int location, const NzMatrix4d& matrix) const;
|
||||
bool SendMatrix(int location, const NzMatrix4f& matrix) const;
|
||||
bool SendTexture(int location, const NzTexture* texture, nzUInt8* textureUnit = nullptr) const;
|
||||
bool SendVector(int location, const NzVector2d& vector) const;
|
||||
bool SendVector(int location, const NzVector2f& vector) const;
|
||||
bool SendVector(int location, const NzVector3d& vector) const;
|
||||
bool SendVector(int location, const NzVector3f& vector) const;
|
||||
bool SendVector(int location, const NzVector4d& vector) const;
|
||||
bool SendVector(int location, const NzVector4f& vector) const;
|
||||
|
||||
void Unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user