common.h 726 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2011-2013 Branimir Karadzic. All rights reserved.
  3. * License: http://www.opensource.org/licenses/BSD-2-Clause
  4. */
  5. #ifndef __COMMON_H__
  6. #define __COMMON_H__
  7. #include "dbg.h"
  8. #if 0
  9. # define BX_TRACE(_format, ...) \
  10. do { \
  11. DBG(BX_FILE_LINE_LITERAL "BGFX " _format "\n", ##__VA_ARGS__); \
  12. } while(0)
  13. # define BX_WARN(_condition, _format, ...) \
  14. do { \
  15. if (!(_condition) ) \
  16. { \
  17. DBG("WARN " _format, ##__VA_ARGS__); \
  18. } \
  19. } while(0)
  20. # define BX_CHECK(_condition, _format, ...) \
  21. do { \
  22. if (!(_condition) ) \
  23. { \
  24. DBG("CHECK " _format, ##__VA_ARGS__); \
  25. bx::debugBreak(); \
  26. } \
  27. } while(0)
  28. #endif // 0
  29. #include <bx/bx.h>
  30. #include <bx/debug.h>
  31. #endif // __COMMON_H__