29 #ifndef NVBLASTPXCALLBACKS_H 30 #define NVBLASTPXCALLBACKS_H 33 #include "PxErrorCallback.h" 34 #include "PxAllocatorCallback.h" 43 class PxErrorCallbackWrapper :
public physx::PxErrorCallback
45 virtual void reportError(physx::PxErrorCode::Enum code,
const char* message,
const char* file,
int line)
override 50 static PxErrorCallbackWrapper wrapper;
56 class PxAllocatorCallbackWrapper :
public physx::PxAllocatorCallback
58 virtual void* allocate(
size_t size,
const char* typeName,
const char* filename,
int line)
override 63 virtual void deallocate(
void* ptr)
override 68 static PxAllocatorCallbackWrapper wrapper;
73 #endif // #ifndef NVBLASTPXCALLBACKS_H virtual void deallocate(void *ptr)=0
Frees memory previously allocated by allocate().
virtual void * allocate(size_t size, const char *typeName, const char *filename, int line)=0
Allocates size bytes of memory, which must be 16-byte aligned.
virtual void reportError(ErrorCode::Enum code, const char *message, const char *file, int line)=0
Reports an error code.
NVBLAST_API Nv::Blast::AllocatorCallback * NvBlastGlobalGetAllocatorCallback()
NV_INLINE physx::PxAllocatorCallback & NvBlastGetPxAllocatorCallback()
Definition: NvBlastPxCallbacks.h:54
NVBLAST_API Nv::Blast::ErrorCallback * NvBlastGlobalGetErrorCallback()
#define NV_INLINE
Definition: NvPreprocessor.h:350
NV_INLINE physx::PxErrorCallback & NvBlastGetPxErrorCallback()
Definition: NvBlastPxCallbacks.h:41
Enum
Definition: NvBlastGlobals.h:90