![]() |
LLGL 0.05 Beta
|
Base class for all hardware resource interfaces. More...
#include <Resource.h>
Public Member Functions | |
| virtual ResourceType | GetResourceType () const =0 |
| Returns the type of this resource object. | |
| virtual bool | GetNativeHandle (void *nativeHandle, std::size_t nativeHandleSize)=0 |
| Returns the native resource handle. | |
| Public Member Functions inherited from LLGL::RenderSystemChild | |
| virtual void | SetDebugName (const char *name) |
| Sets the name of this class instance for debugging purposes. | |
| Public Member Functions inherited from LLGL::Interface | |
| virtual bool | IsInstanceOf (int id) const |
| Returns true if this object is an instance of the specified interface. | |
| Public Member Functions inherited from LLGL::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| virtual | ~NonCopyable ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from LLGL::NonCopyable | |
| NonCopyable ()=default | |
|
pure virtual |
Returns the native resource handle.
| [out] | nativeHandle | Raw pointer to the backend specific structure to store the native handle. Obtain the respective structure from #include <LLGL/Backend/BACKEND/NativeHandle.h> where BACKEND must be either Direct3D12, Direct3D11, Vulkan, Metal, or OpenGL. |
| [in] | nativeHandleSize | Specifies the size (in bytes) of the native handle structure for robustness. This must be sizeof(STRUCT) where STRUCT is the respective backend specific structure such as LLGL::Direct3D12::ResourceNativeHandle. |
nativeHandleSize specifies an incompatible structure size.IUnknown::Release is required to each of the objects returned by this function. NSObject instances will have their retain counter incremented and the user is responsible for releasing those objects, i.e. a call to -(oneway void)release is required to each of the objects returned by this function. nativeHandle is null or nativeHandleSize is 0.
|
pure virtual |
Returns the type of this resource object.
Implemented in LLGL::Buffer, LLGL::Sampler, and LLGL::Texture.