Files
o3de/Code/Legacy/CryCommon/IMaterial.h
T
Artur K 96a5f06ca3 Legacy cleanup, part 2 (#3659)
* Legacy cleanup, part 2

There are still things that can be removed, those will be likely done in part three:
`The Return of the Cleanup` :)

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix windows build

Somehow there were some unfixed errors from enabled warnings?
I'm unsure if I've pulled repo in unstable state, or those were somehow
missed.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
2021-08-30 14:40:02 -06:00

50 lines
1.2 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Description : IMaterial interface declaration.
#pragma once
#include <smartptr.h>
#include <AzCore/EBus/EBus.h>
struct IShader;
struct ISurfaceType;
struct SShaderItem;
namespace AZ
{
class MaterialNotificationEvents : public AZ::EBusTraits
{
public:
virtual ~MaterialNotificationEvents() {}
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
static const bool EnableEventQueue = true;
using EventQueueMutexType = AZStd::mutex;
virtual void OnShaderLoaded([[maybe_unused]] IShader* shader) {}
};
using MaterialNotificationEventBus = AZ::EBus<MaterialNotificationEvents>;
}
struct IMaterial
{
// TODO: Remove it!
virtual ~IMaterial() {}
virtual void AddRef() = 0;
virtual void Release() = 0;
virtual SShaderItem& GetShaderItem() = 0;
virtual const SShaderItem& GetShaderItem() const = 0;
};