Added ResourceId GetResID(WrappedMTLObject *obj)

This commit is contained in:
Jake Turner
2022-03-12 19:34:30 +00:00
committed by Baldur Karlsson
parent 33d8061555
commit d79617cb46
2 changed files with 10 additions and 0 deletions
@@ -25,6 +25,14 @@
#include "metal_resources.h"
#include "metal_device.h"
ResourceId GetResID(WrappedMTLObject *obj)
{
if(obj == NULL)
return ResourceId();
return obj->id;
}
void WrappedMTLObject::Dealloc()
{
// TODO: call the wrapped object destructor
+2
View File
@@ -75,6 +75,8 @@ struct WrappedMTLObject
CaptureState &m_State;
};
ResourceId GetResID(WrappedMTLObject *obj);
template <typename RealType>
RealType Unwrap(WrappedMTLObject *obj)
{