It is now possible to send uniforms to shader when they are not mounted; Added shader locking

This commit is contained in:
Lynix
2012-05-04 08:56:35 +02:00
parent a4cbe46e15
commit a215920818
5 changed files with 77 additions and 2 deletions

View File

@@ -36,6 +36,8 @@ class NzShaderImpl
virtual bool Load(nzShaderType type, const NzString& source) = 0;
virtual bool Lock() const = 0;
virtual bool SendBoolean(const NzString& name, bool value) = 0;
virtual bool SendDouble(const NzString& name, double value) = 0;
virtual bool SendFloat(const NzString& name, float value) = 0;
@@ -44,6 +46,7 @@ class NzShaderImpl
virtual bool SendMatrix(const NzString& name, const NzMatrix4f& matrix) = 0;
virtual void Unbind() = 0;
virtual void Unlock() const = 0;
protected:
virtual bool UpdateVertexBuffer(const NzVertexBuffer* vertexBuffer, const NzVertexDeclaration* vertexDeclaration) = 0;