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

@@ -55,6 +55,8 @@ class NAZARA_API NzShader
bool Load(nzShaderType type, const NzString& source);
bool LoadFromFile(nzShaderType type, const NzString& source);
bool Lock();
bool SendBoolean(const NzString& name, bool value);
bool SendDouble(const NzString& name, double value);
bool SendFloat(const NzString& name, float value);
@@ -62,12 +64,12 @@ class NAZARA_API NzShader
bool SendMatrix(const NzString& name, const NzMatrix4d& matrix);
bool SendMatrix(const NzString& name, const NzMatrix4f& matrix);
void Unlock();
static bool IsLanguageSupported(nzShaderLanguage language);
static bool IsTypeSupported(nzShaderType type);
private:
bool CommitUniforms();
NzShaderImpl* m_impl;
bool m_compiled;
};