Added ShaderUniform (Faster GetUniformLocation)

Former-commit-id: c8a01eccde07fc3b2aac46c5b974f8406ad949f0
This commit is contained in:
Lynix
2013-05-11 14:03:22 +02:00
parent 991d841d57
commit 28f46a5c90
10 changed files with 106 additions and 28 deletions

View File

@@ -32,7 +32,7 @@ class NAZARA_API NzShader : public NzResource, NzNonCopyable
friend class NzRenderer;
public:
NzShader() = default;
NzShader();
NzShader(nzShaderLanguage language);
NzShader(NzShader&& shader);
~NzShader();
@@ -47,6 +47,7 @@ class NAZARA_API NzShader : public NzResource, NzNonCopyable
nzShaderLanguage GetLanguage() const;
NzString GetSourceCode(nzShaderType type) const;
int GetUniformLocation(const NzString& name) const;
int GetUniformLocation(nzShaderUniform uniform) const;
bool HasUniform(const NzString& name) const;
@@ -80,9 +81,9 @@ class NAZARA_API NzShader : public NzResource, NzNonCopyable
static bool IsTypeSupported(nzShaderType type);
private:
nzUInt32 m_flags = nzShaderFlags_None;
NzShaderImpl* m_impl = nullptr;
bool m_compiled = false;
nzUInt32 m_flags;
NzShaderImpl* m_impl;
bool m_compiled;
};
#endif // NAZARA_SHADER_HPP