From 999fd20ca96b8d44d3ce418f118fb3b846038978 Mon Sep 17 00:00:00 2001 From: Jason Maskell Date: Tue, 31 May 2016 11:24:52 +0200 Subject: Added support for RFC 104, the logging interface: https://docs.google.com/document/d/102b8k5pKYj9e-tMmG53aT5izur-qfUSPX1gBro4gN0Q/edit Added a dumb implementation of the logger in the D3D11 sample. Added a method to the WaveWorks API to allow the user to set (override) the internal logger with their own supplied nv::ILogger derived object. --- src/CustomMemory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/CustomMemory.cpp') diff --git a/src/CustomMemory.cpp b/src/CustomMemory.cpp index d511da1..c8102ae 100644 --- a/src/CustomMemory.cpp +++ b/src/CustomMemory.cpp @@ -4,6 +4,7 @@ #if defined(TARGET_PLATFORM_LINUX) #include #endif +#include "InternalLogger.h" #if (defined(TARGET_PLATFORM_MACOSX) || defined(TARGET_PLATFORM_ANDROID)) #define _THROW0() @@ -67,8 +68,9 @@ GFSDK_WAVEWORKS_FREE NVSDK_free = free; void* internalMalloc( size_t size ) { void* p = NVSDK_malloc( size ); - if( !p ) - diagnostic_message( TEXT("WaveWorks: MEMORY ALLOCATION ERROR. Check memory allocation callback pointer\n") ); + if (!p) + NV_ERROR(TEXT("WaveWorks: MEMORY ALLOCATION ERROR. Check memory allocation callback pointer\n")); +// diagnostic_message( TEXT("WaveWorks: MEMORY ALLOCATION ERROR. Check memory allocation callback pointer\n") ); return p; } -- cgit v1.2.3