XLE
v0.02.0
|
A GPU resources with one or more "views" More...
#include <GestaltResource.h>
Public Member Functions | |
template<typename = std::enable_if<HasType<ShaderResourceView, std::tuple<Views...>>::value>> | |
const ShaderResourceView & | SRV () const |
template<typename = std::enable_if<HasType<RenderTargetView, std::tuple<Views...>>::value>> | |
const RenderTargetView & | RTV () const |
template<typename = std::enable_if<HasType<DepthStencilView, std::tuple<Views...>>::value>> | |
const DepthStencilView & | DSV () const |
template<typename = std::enable_if<HasType<UnorderedAccessView, std::tuple<Views...>>::value>> | |
const UnorderedAccessView & | UAV () const |
template<typename Type , typename = std::enable_if<HasType<Type, std::tuple<Views...>>::value>> | |
operator const Type & () const | |
const bool | IsGood () const |
const BufferUploads::ResourceLocator & | Locator () const |
GestaltResource (const BufferUploads::TextureDesc &desc, const char name[], BufferUploads::DataPacket *initialData=nullptr) | |
GestaltResource (const BufferUploads::LinearBufferDesc &desc, const char name[], BufferUploads::DataPacket *initialData=nullptr, unsigned extraBindFlags=0u) | |
GestaltResource (GestaltResource &&moveFrom) never_throws | |
GestaltResource & | operator= (GestaltResource &&moveFrom) never_throws |
GestaltResource (const GestaltResource &)=delete | |
GestaltResource & | operator= (const GestaltResource &)=delete |
A GPU resources with one or more "views"
Usually GPU resources are allocated by first reserving some memory, and then creating some view objects. The view objects determine how the memory will be used – as a render target, or a shader resource (etc).
This class is a utility to help automate the creation of the resource and views. It doesn't provide much more functionality; just enough for construction and some accessors.
See the GestaltTypes namespace for some renames for common types. For example, "RTVSRV" might be the most common type. This is a resource that can be used as a render target and as a texture.