Graphics/Material: Add PrimitiveMode support
This commit is contained in:
parent
d6248a061d
commit
e073e1a44d
|
|
@ -68,6 +68,7 @@ namespace Nz
|
||||||
inline const std::shared_ptr<MaterialPipeline>& GetPipeline() const;
|
inline const std::shared_ptr<MaterialPipeline>& GetPipeline() const;
|
||||||
inline const MaterialPipelineInfo& GetPipelineInfo() const;
|
inline const MaterialPipelineInfo& GetPipelineInfo() const;
|
||||||
inline float GetPointSize() const;
|
inline float GetPointSize() const;
|
||||||
|
inline PrimitiveMode GetPrimitiveMode() const;
|
||||||
inline const std::shared_ptr<const MaterialSettings>& GetSettings() const;
|
inline const std::shared_ptr<const MaterialSettings>& GetSettings() const;
|
||||||
inline const std::shared_ptr<UberShader>& GetShader(ShaderStageType shaderStage) const;
|
inline const std::shared_ptr<UberShader>& GetShader(ShaderStageType shaderStage) const;
|
||||||
inline ShaderBinding& GetShaderBinding();
|
inline ShaderBinding& GetShaderBinding();
|
||||||
|
|
@ -100,6 +101,7 @@ namespace Nz
|
||||||
inline void SetFaceFilling(FaceFilling filling);
|
inline void SetFaceFilling(FaceFilling filling);
|
||||||
inline void SetLineWidth(float lineWidth);
|
inline void SetLineWidth(float lineWidth);
|
||||||
inline void SetPointSize(float pointSize);
|
inline void SetPointSize(float pointSize);
|
||||||
|
inline void SetPrimitiveMode(PrimitiveMode mode);
|
||||||
inline void SetTexture(std::size_t textureIndex, std::shared_ptr<Texture> texture);
|
inline void SetTexture(std::size_t textureIndex, std::shared_ptr<Texture> texture);
|
||||||
inline void SetTextureSampler(std::size_t textureIndex, TextureSamplerInfo samplerInfo);
|
inline void SetTextureSampler(std::size_t textureIndex, TextureSamplerInfo samplerInfo);
|
||||||
inline void SetUniformBuffer(std::size_t bufferIndex, std::shared_ptr<AbstractBuffer> uniformBuffer);
|
inline void SetUniformBuffer(std::size_t bufferIndex, std::shared_ptr<AbstractBuffer> uniformBuffer);
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,11 @@ namespace Nz
|
||||||
return m_pipelineInfo.pointSize;
|
return m_pipelineInfo.pointSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline PrimitiveMode Material::GetPrimitiveMode() const
|
||||||
|
{
|
||||||
|
return m_pipelineInfo.primitiveMode;
|
||||||
|
}
|
||||||
|
|
||||||
inline const std::shared_ptr<const MaterialSettings>& Material::GetSettings() const
|
inline const std::shared_ptr<const MaterialSettings>& Material::GetSettings() const
|
||||||
{
|
{
|
||||||
return m_settings;
|
return m_settings;
|
||||||
|
|
@ -693,6 +698,14 @@ namespace Nz
|
||||||
InvalidatePipeline();
|
InvalidatePipeline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Material::SetPrimitiveMode(PrimitiveMode mode)
|
||||||
|
{
|
||||||
|
m_pipelineInfo.primitiveMode = mode;
|
||||||
|
|
||||||
|
InvalidatePipeline();
|
||||||
|
}
|
||||||
|
|
||||||
inline void Material::SetTexture(std::size_t textureIndex, std::shared_ptr<Texture> texture)
|
inline void Material::SetTexture(std::size_t textureIndex, std::shared_ptr<Texture> texture)
|
||||||
{
|
{
|
||||||
NazaraAssert(textureIndex < m_textures.size(), "Invalid texture index");
|
NazaraAssert(textureIndex < m_textures.size(), "Invalid texture index");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue