Graphics/Material: Inline class
Former-commit-id: 7cd8b7a00c87adf087dae7d0fb8d955747cf82d1
This commit is contained in:
@@ -53,90 +53,90 @@ class NAZARA_GRAPHICS_API NzMaterial : public NzRefCounted, public NzResource
|
||||
friend class NzGraphics;
|
||||
|
||||
public:
|
||||
NzMaterial();
|
||||
NzMaterial(const NzMaterial& material);
|
||||
~NzMaterial();
|
||||
inline NzMaterial();
|
||||
inline NzMaterial(const NzMaterial& material);
|
||||
inline ~NzMaterial();
|
||||
|
||||
const NzShader* Apply(nzUInt32 shaderFlags = 0, nzUInt8 textureUnit = 0, nzUInt8* lastUsedUnit = nullptr) const;
|
||||
|
||||
void Enable(nzRendererParameter renderParameter, bool enable);
|
||||
void EnableAlphaTest(bool alphaTest);
|
||||
void EnableDepthSorting(bool depthSorting);
|
||||
void EnableLighting(bool lighting);
|
||||
void EnableTransform(bool transform);
|
||||
inline void Enable(nzRendererParameter renderParameter, bool enable);
|
||||
inline void EnableAlphaTest(bool alphaTest);
|
||||
inline void EnableDepthSorting(bool depthSorting);
|
||||
inline void EnableLighting(bool lighting);
|
||||
inline void EnableTransform(bool transform);
|
||||
|
||||
NzTexture* GetAlphaMap() const;
|
||||
float GetAlphaThreshold() const;
|
||||
NzColor GetAmbientColor() const;
|
||||
nzRendererComparison GetDepthFunc() const;
|
||||
NzColor GetDiffuseColor() const;
|
||||
NzTexture* GetDiffuseMap() const;
|
||||
NzTextureSampler& GetDiffuseSampler();
|
||||
const NzTextureSampler& GetDiffuseSampler() const;
|
||||
nzBlendFunc GetDstBlend() const;
|
||||
NzTexture* GetEmissiveMap() const;
|
||||
nzFaceSide GetFaceCulling() const;
|
||||
nzFaceFilling GetFaceFilling() const;
|
||||
NzTexture* GetHeightMap() const;
|
||||
NzTexture* GetNormalMap() const;
|
||||
const NzRenderStates& GetRenderStates() const;
|
||||
const NzUberShader* GetShader() const;
|
||||
const NzUberShaderInstance* GetShaderInstance(nzUInt32 flags = nzShaderFlags_None) const;
|
||||
float GetShininess() const;
|
||||
NzColor GetSpecularColor() const;
|
||||
NzTexture* GetSpecularMap() const;
|
||||
NzTextureSampler& GetSpecularSampler();
|
||||
const NzTextureSampler& GetSpecularSampler() const;
|
||||
nzBlendFunc GetSrcBlend() const;
|
||||
inline NzTexture* GetAlphaMap() const;
|
||||
inline float GetAlphaThreshold() const;
|
||||
inline NzColor GetAmbientColor() const;
|
||||
inline nzRendererComparison GetDepthFunc() const;
|
||||
inline NzColor GetDiffuseColor() const;
|
||||
inline NzTexture* GetDiffuseMap() const;
|
||||
inline NzTextureSampler& GetDiffuseSampler();
|
||||
inline const NzTextureSampler& GetDiffuseSampler() const;
|
||||
inline nzBlendFunc GetDstBlend() const;
|
||||
inline NzTexture* GetEmissiveMap() const;
|
||||
inline nzFaceSide GetFaceCulling() const;
|
||||
inline nzFaceFilling GetFaceFilling() const;
|
||||
inline NzTexture* GetHeightMap() const;
|
||||
inline NzTexture* GetNormalMap() const;
|
||||
inline const NzRenderStates& GetRenderStates() const;
|
||||
inline const NzUberShader* GetShader() const;
|
||||
inline const NzUberShaderInstance* GetShaderInstance(nzUInt32 flags = nzShaderFlags_None) const;
|
||||
inline float GetShininess() const;
|
||||
inline NzColor GetSpecularColor() const;
|
||||
inline NzTexture* GetSpecularMap() const;
|
||||
inline NzTextureSampler& GetSpecularSampler();
|
||||
inline const NzTextureSampler& GetSpecularSampler() const;
|
||||
inline nzBlendFunc GetSrcBlend() const;
|
||||
|
||||
bool HasAlphaMap() const;
|
||||
bool HasDiffuseMap() const;
|
||||
bool HasEmissiveMap() const;
|
||||
bool HasHeightMap() const;
|
||||
bool HasNormalMap() const;
|
||||
bool HasSpecularMap() const;
|
||||
inline bool HasAlphaMap() const;
|
||||
inline bool HasDiffuseMap() const;
|
||||
inline bool HasEmissiveMap() const;
|
||||
inline bool HasHeightMap() const;
|
||||
inline bool HasNormalMap() const;
|
||||
inline bool HasSpecularMap() const;
|
||||
|
||||
bool IsAlphaTestEnabled() const;
|
||||
bool IsDepthSortingEnabled() const;
|
||||
bool IsEnabled(nzRendererParameter renderParameter) const;
|
||||
bool IsLightingEnabled() const;
|
||||
bool IsTransformEnabled() const;
|
||||
inline bool IsAlphaTestEnabled() const;
|
||||
inline bool IsDepthSortingEnabled() const;
|
||||
inline bool IsEnabled(nzRendererParameter renderParameter) const;
|
||||
inline bool IsLightingEnabled() const;
|
||||
inline bool IsTransformEnabled() const;
|
||||
|
||||
bool LoadFromFile(const NzString& filePath, const NzMaterialParams& params = NzMaterialParams());
|
||||
bool LoadFromMemory(const void* data, std::size_t size, const NzMaterialParams& params = NzMaterialParams());
|
||||
bool LoadFromStream(NzInputStream& stream, const NzMaterialParams& params = NzMaterialParams());
|
||||
inline bool LoadFromFile(const NzString& filePath, const NzMaterialParams& params = NzMaterialParams());
|
||||
inline bool LoadFromMemory(const void* data, std::size_t size, const NzMaterialParams& params = NzMaterialParams());
|
||||
inline bool LoadFromStream(NzInputStream& stream, const NzMaterialParams& params = NzMaterialParams());
|
||||
|
||||
void Reset();
|
||||
|
||||
bool SetAlphaMap(const NzString& textureName);
|
||||
void SetAlphaMap(NzTextureRef alphaMap);
|
||||
void SetAlphaThreshold(float alphaThreshold);
|
||||
void SetAmbientColor(const NzColor& ambient);
|
||||
void SetDepthFunc(nzRendererComparison depthFunc);
|
||||
void SetDiffuseColor(const NzColor& diffuse);
|
||||
bool SetDiffuseMap(const NzString& textureName);
|
||||
void SetDiffuseMap(NzTextureRef diffuseMap);
|
||||
void SetDiffuseSampler(const NzTextureSampler& sampler);
|
||||
void SetDstBlend(nzBlendFunc func);
|
||||
bool SetEmissiveMap(const NzString& textureName);
|
||||
void SetEmissiveMap(NzTextureRef textureName);
|
||||
void SetFaceCulling(nzFaceSide faceSide);
|
||||
void SetFaceFilling(nzFaceFilling filling);
|
||||
bool SetHeightMap(const NzString& textureName);
|
||||
void SetHeightMap(NzTextureRef textureName);
|
||||
bool SetNormalMap(const NzString& textureName);
|
||||
void SetNormalMap(NzTextureRef textureName);
|
||||
void SetRenderStates(const NzRenderStates& states);
|
||||
void SetShader(NzUberShaderConstRef uberShader);
|
||||
bool SetShader(const NzString& uberShaderName);
|
||||
void SetShininess(float shininess);
|
||||
void SetSpecularColor(const NzColor& specular);
|
||||
bool SetSpecularMap(const NzString& textureName);
|
||||
void SetSpecularMap(NzTextureRef specularMap);
|
||||
void SetSpecularSampler(const NzTextureSampler& sampler);
|
||||
void SetSrcBlend(nzBlendFunc func);
|
||||
inline bool SetAlphaMap(const NzString& textureName);
|
||||
inline void SetAlphaMap(NzTextureRef alphaMap);
|
||||
inline void SetAlphaThreshold(float alphaThreshold);
|
||||
inline void SetAmbientColor(const NzColor& ambient);
|
||||
inline void SetDepthFunc(nzRendererComparison depthFunc);
|
||||
inline void SetDiffuseColor(const NzColor& diffuse);
|
||||
inline bool SetDiffuseMap(const NzString& textureName);
|
||||
inline void SetDiffuseMap(NzTextureRef diffuseMap);
|
||||
inline void SetDiffuseSampler(const NzTextureSampler& sampler);
|
||||
inline void SetDstBlend(nzBlendFunc func);
|
||||
inline bool SetEmissiveMap(const NzString& textureName);
|
||||
inline void SetEmissiveMap(NzTextureRef textureName);
|
||||
inline void SetFaceCulling(nzFaceSide faceSide);
|
||||
inline void SetFaceFilling(nzFaceFilling filling);
|
||||
inline bool SetHeightMap(const NzString& textureName);
|
||||
inline void SetHeightMap(NzTextureRef textureName);
|
||||
inline bool SetNormalMap(const NzString& textureName);
|
||||
inline void SetNormalMap(NzTextureRef textureName);
|
||||
inline void SetRenderStates(const NzRenderStates& states);
|
||||
inline void SetShader(NzUberShaderConstRef uberShader);
|
||||
inline bool SetShader(const NzString& uberShaderName);
|
||||
inline void SetShininess(float shininess);
|
||||
inline void SetSpecularColor(const NzColor& specular);
|
||||
inline bool SetSpecularMap(const NzString& textureName);
|
||||
inline void SetSpecularMap(NzTextureRef specularMap);
|
||||
inline void SetSpecularSampler(const NzTextureSampler& sampler);
|
||||
inline void SetSrcBlend(nzBlendFunc func);
|
||||
|
||||
NzMaterial& operator=(const NzMaterial& material);
|
||||
inline NzMaterial& operator=(const NzMaterial& material);
|
||||
|
||||
static NzMaterialRef GetDefault();
|
||||
template<typename... Args> static NzMaterialRef New(Args&&... args);
|
||||
@@ -155,7 +155,7 @@ class NAZARA_GRAPHICS_API NzMaterial : public NzRefCounted, public NzResource
|
||||
|
||||
void Copy(const NzMaterial& material);
|
||||
void GenerateShader(nzUInt32 flags) const;
|
||||
void InvalidateShaders();
|
||||
inline void InvalidateShaders();
|
||||
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
Reference in New Issue
Block a user