Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

  1. #ifndef GLMDEBUG_H
  2. #define GLMDEBUG_H
  3. // include this anywhere you need to be able to compile-out code related specifically to GLM debugging.
  4. // we expect DEBUG to be driven by the build system so you can include this header anywhere.
  5. // when we come out, GLMDEBUG will be defined to a value - 0, 1, or 2
  6. // 0 means no GLM debugging is possible
  7. // 1 means it's possible and resulted from being a debug build
  8. // 2 means it's possible and resulted from being manually forced on for a release build
  9. #if defined( POSIX ) && !defined( _PS3 )
  10. #ifndef GLMDEBUG
  11. #ifdef DEBUG
  12. #define GLMDEBUG 1 // normally 1 here, testing
  13. #else
  14. // #define GLMDEBUG 2 // don't check this in enabled..
  15. #endif
  16. #ifndef GLMDEBUG
  17. #define GLMDEBUG 0
  18. #endif
  19. #endif
  20. #else
  21. #ifndef GLMDEBUG
  22. #define GLMDEBUG 0
  23. #endif
  24. #endif
  25. // helpful macro if you are in a position to call GLM functions directly (i.e. you live in materialsystem / shaderapidx9)
  26. #if GLMDEBUG
  27. #define GLMPRINTF(args) GLMPrintf args
  28. #define GLMPRINTSTR(args) GLMPrintStr args
  29. #define GLMPRINTTEXT(args) GLMPrintText args
  30. #define GLMBEGINPIXEVENT(args) GLMBeginPIXEvent args
  31. #define GLMENDPIXEVENT(args) GLMEndPIXEvent args
  32. #else
  33. #define GLMPRINTF(args)
  34. #define GLMPRINTSTR(args)
  35. #define GLMPRINTTEXT(args)
  36. #define GLMBEGINPIXEVENT(args)
  37. #define GLMENDPIXEVENT(args)
  38. #endif
  39. #endif