Open 3D Engine Atom Gem API Reference 25.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::ResourceView Class Referenceabstract

#include <ResourceView.h>

Inherits AZ::RHI::Object.

Inherited by AZ::RHI::BufferView, and AZ::RHI::ImageView.

Public Member Functions

 AZ_RTTI (ResourceView, "{D7442960-531D-4DCC-B60D-FD26FF75BE51}", Object)
 
 ResourceView (const RHI::Resource *resource, MultiDevice::DeviceMask deviceMask)
 
const ResourceGetResource () const
 Returns the resource associated with this view.
 
virtual const DeviceResourceViewGetDeviceResourceView (int deviceIndex) const =0
 Interface for the two derived classes to return a DeviceResourceView.
 
- Public Member Functions inherited from AZ::RHI::Object
 AZ_RTTI (Object, "{E43378F1-2331-4173-94B8-990ED20E6003}")
 
void SetName (const Name &name)
 Sets the name of the object.
 
const Name & GetName () const
 Returns the name set on the object by SetName.
 
uint32_t use_count ()
 Returns the current use count of the object.
 

Protected Member Functions

template<typename View , typename ViewDescriptor >
const RHI::Ptr< View > GetDeviceResourceView (int deviceIndex, const ViewDescriptor &viewDescriptor) const
 
- Protected Member Functions inherited from AZ::RHI::Object
void add_ref () const
 
void release () const
 

Friends

class Resource
 

Additional Inherited Members

- Protected Attributes inherited from AZ::RHI::Object
AZStd::atomic_int m_useCount = 0
 

Detailed Description

ResourceView is a base class for multi-device buffer and image views for polymorphic usage of views in a generic way. As the handling of the device-specific ResourceViews is more elaborate, this does not inherit from MultiDeviceObject but manages the DeviceResourceViews on its own

Member Function Documentation

◆ GetDeviceResourceView() [1/2]

virtual const DeviceResourceView * AZ::RHI::ResourceView::GetDeviceResourceView ( int  deviceIndex) const
pure virtual

Interface for the two derived classes to return a DeviceResourceView.

Implemented in AZ::RHI::BufferView, and AZ::RHI::ImageView.

◆ GetDeviceResourceView() [2/2]

template<typename View , typename ViewDescriptor >
const RHI::Ptr< View > AZ::RHI::ResourceView::GetDeviceResourceView ( int  deviceIndex,
const ViewDescriptor &  viewDescriptor 
) const
protected

Templated method for both DeviceImageView and DeviceBufferView that either creates and caches or return the corresponding DeviceResourceView


The documentation for this class was generated from the following file: