Add shader getter to IMaterial interface
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "MaterialInfo.h"
|
||||
|
||||
struct MaterialParamsLink;
|
||||
class GPUShader;
|
||||
class GPUContext;
|
||||
class GPUTextureView;
|
||||
class RenderBuffers;
|
||||
@@ -26,6 +27,12 @@ public:
|
||||
/// <returns>The constant reference to the material descriptor.</returns>
|
||||
virtual const MaterialInfo& GetInfo() const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the shader resource.
|
||||
/// </summary>
|
||||
/// <returns>The material shader resource.</returns>
|
||||
virtual GPUShader* GetShader() const = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether material is a surface shader.
|
||||
/// </summary>
|
||||
|
||||
@@ -98,8 +98,6 @@ public:
|
||||
/// <returns>The created and loaded material or null if failed.</returns>
|
||||
static MaterialShader* CreateDummy(MemoryReadStream& shaderCacheStream, const MaterialInfo& info);
|
||||
|
||||
GPUShader* GetShader() const;
|
||||
|
||||
/// <summary>
|
||||
/// Clears the loaded data.
|
||||
/// </summary>
|
||||
@@ -114,5 +112,6 @@ public:
|
||||
|
||||
// [IMaterial]
|
||||
const MaterialInfo& GetInfo() const override;
|
||||
GPUShader* GetShader() const override;
|
||||
bool IsReady() const override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user