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.

61 lines
1.5 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #ifndef GL_CVARS_H
  9. #define GL_CVARS_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "convar.h"
  14. #include "cmd.h"
  15. // Stuff that's dealt with by the material system
  16. extern ConVar mat_wireframe; // Draw the world in wireframe mode
  17. extern ConVar mat_normals; // Draw the world with vertex normals
  18. extern ConVar mat_luxels; // Draw lightmaps as checkerboards
  19. extern ConVar mat_loadtextures; // Can help load levels quickly for debugging.
  20. extern ConVar mat_bumpbasis; // Draw the world with the bump basis vectors drawn
  21. extern ConVar mat_envmapsize; // Dimensions of square skybox bitmap (in 3D screen shots, not game textures)
  22. extern ConVar mat_envmaptgasize;
  23. extern ConVar mat_levelflush;
  24. extern ConVar mat_hdr_level;
  25. static inline bool CanCheat()
  26. {
  27. extern ConVar sv_cheats;
  28. extern ConVar cl_debug_respect_cheat_vars;
  29. #ifdef _DEBUG
  30. bool bRespectCheatVars = cl_debug_respect_cheat_vars.GetBool() && !Cmd_IsRptActive();
  31. if ( bRespectCheatVars )
  32. return sv_cheats.GetBool();
  33. return true;
  34. #else
  35. return ( sv_cheats.GetBool() );
  36. #endif
  37. }
  38. static inline int WireFrameMode( void )
  39. {
  40. if ( CanCheat() )
  41. return mat_wireframe.GetInt();
  42. return 0;
  43. }
  44. static inline bool ShouldDrawInWireFrameMode( void )
  45. {
  46. if ( CanCheat() )
  47. return ( mat_wireframe.GetInt() != 0 );
  48. return false;
  49. }
  50. extern ConVar r_drawbrushmodels;
  51. #endif //GL_CVARS_H