Graphics: Make use of shader binding sets
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
class CommandBufferBuilder;
|
||||
class UploadPool;
|
||||
class RenderFrame;
|
||||
|
||||
class NAZARA_GRAPHICS_API Material : public Resource
|
||||
{
|
||||
@@ -70,6 +70,7 @@ namespace Nz
|
||||
inline float GetPointSize() const;
|
||||
inline const std::shared_ptr<const MaterialSettings>& GetSettings() const;
|
||||
inline const std::shared_ptr<UberShader>& GetShader(ShaderStageType shaderStage) const;
|
||||
inline ShaderBinding& GetShaderBinding();
|
||||
inline const std::shared_ptr<Texture>& GetTexture(std::size_t textureIndex) const;
|
||||
inline const TextureSamplerInfo& GetTextureSampler(std::size_t textureIndex) const;
|
||||
inline const std::shared_ptr<AbstractBuffer>& GetUniformBuffer(std::size_t bufferIndex) const;
|
||||
@@ -103,8 +104,7 @@ namespace Nz
|
||||
inline void SetTextureSampler(std::size_t textureIndex, TextureSamplerInfo samplerInfo);
|
||||
inline void SetUniformBuffer(std::size_t bufferIndex, std::shared_ptr<AbstractBuffer> uniformBuffer);
|
||||
|
||||
void UpdateBuffers(UploadPool& uploadPool, CommandBufferBuilder& builder);
|
||||
void UpdateShaderBinding(ShaderBinding& shaderBinding) const;
|
||||
bool Update(RenderFrame& renderFrame, CommandBufferBuilder& builder);
|
||||
|
||||
// Signals:
|
||||
NazaraSignal(OnMaterialRelease, const Material* /*material*/);
|
||||
@@ -114,6 +114,7 @@ namespace Nz
|
||||
inline void InvalidateShaderBinding();
|
||||
inline void InvalidateTextureSampler(std::size_t textureIndex);
|
||||
inline void UpdatePipeline() const;
|
||||
void UpdateShaderBinding();
|
||||
|
||||
struct MaterialTexture
|
||||
{
|
||||
@@ -135,7 +136,9 @@ namespace Nz
|
||||
mutable std::shared_ptr<MaterialPipeline> m_pipeline;
|
||||
UInt64 m_enabledConditions;
|
||||
mutable MaterialPipelineInfo m_pipelineInfo;
|
||||
ShaderBindingPtr m_shaderBinding;
|
||||
mutable bool m_pipelineUpdated;
|
||||
bool m_shaderBindingUpdated;
|
||||
bool m_shadowCastingEnabled;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user