1#ifndef NW_G3D_ASSERT_H_
2#define NW_G3D_ASSERT_H_
6#ifndef NW_G3D_ASSERTMSG
7#if NW_G3D_IS_DEBUG || NW_G3D_IS_DEVELOP
8#define NW_G3D_ASSERTMSG(exp, ...)
9 (void) ((exp) || (OSReport(__VA_ARGS__),
10 OSReport("\t%s(%d)\n", NW_G3D_CODE_POSITION_NAME, __LINE__),
11 NW_G3D_DEBUG_BREAK(), ::exit(EXIT_FAILURE), 0
))
13#define NW_G3D_ASSERTMSG(exp, ...) ((void)0
)
17#define NW_G3D_ASSERT(exp)
20#define NW_G3D_ASSERT_NOT_NULL(exp)
23#define NW_G3D_ASSERT_INDEX_BOUNDS(index, size)
25 "NW: " #index " is out of bounds. (%d)\n"
26 "0 <= " #index " < %d is not satisfied.\n",
27 static_cast<int>(index), static_cast<int>(size))
29#define NW_G3D_ASSERT_ALIGNMENT(value, alignment)
31 "NW: Failed alignment. \n"
34 value, static_cast<int>(alignment))
36#define NW_G3D_ASSERT_ADDR_ALIGNMENT(addr, alignment)
38 "NW: Failed alignment. \n"
41 reinterpret_cast<uintptr_t>(addr), static_cast<int>(alignment))
43#define NW_G3D_NOT_IMPLEMENTED()
46#define NW_G3D_NOT_SUPPORTED()
49#if defined(_DEBUG) || defined(NW_DEBUG) || defined(NW_DEVELOP)
50#define NW_G3D_WARNING(exp, ...)
51 (void) ((exp) || (OSReport("NW: "), OSReport(__VA_ARGS__),
52 OSReport("\t%s(%d)\n", NW_G3D_CODE_POSITION_NAME, __LINE__), 0
))
54#define NW_G3D_WARNING(exp, ... ) ((void)0
)
57namespace nw {
namespace g3d {
63#define NW_G3D_DEBUG_BREAK()
#define NW_G3D_ASSERTMSG(exp,...)
Definition g3d_assert.h:13
Definition g3d_GfxManage.cpp:10
void DebugPrint(const char *format,...)