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
61 lines
1.5 KiB
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//
|
|
//===========================================================================//
|
|
|
|
#ifndef GL_CVARS_H
|
|
#define GL_CVARS_H
|
|
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "convar.h"
|
|
#include "cmd.h"
|
|
|
|
// Stuff that's dealt with by the material system
|
|
extern ConVar mat_wireframe; // Draw the world in wireframe mode
|
|
extern ConVar mat_normals; // Draw the world with vertex normals
|
|
extern ConVar mat_luxels; // Draw lightmaps as checkerboards
|
|
extern ConVar mat_loadtextures; // Can help load levels quickly for debugging.
|
|
extern ConVar mat_bumpbasis; // Draw the world with the bump basis vectors drawn
|
|
extern ConVar mat_envmapsize; // Dimensions of square skybox bitmap (in 3D screen shots, not game textures)
|
|
extern ConVar mat_envmaptgasize;
|
|
extern ConVar mat_levelflush;
|
|
extern ConVar mat_hdr_level;
|
|
|
|
static inline bool CanCheat()
|
|
{
|
|
extern ConVar sv_cheats;
|
|
extern ConVar cl_debug_respect_cheat_vars;
|
|
|
|
#ifdef _DEBUG
|
|
bool bRespectCheatVars = cl_debug_respect_cheat_vars.GetBool() && !Cmd_IsRptActive();
|
|
if ( bRespectCheatVars )
|
|
return sv_cheats.GetBool();
|
|
return true;
|
|
#else
|
|
return ( sv_cheats.GetBool() );
|
|
#endif
|
|
}
|
|
|
|
static inline int WireFrameMode( void )
|
|
{
|
|
if ( CanCheat() )
|
|
return mat_wireframe.GetInt();
|
|
return 0;
|
|
}
|
|
|
|
static inline bool ShouldDrawInWireFrameMode( void )
|
|
{
|
|
if ( CanCheat() )
|
|
return ( mat_wireframe.GetInt() != 0 );
|
|
return false;
|
|
}
|
|
|
|
extern ConVar r_drawbrushmodels;
|
|
|
|
#endif //GL_CVARS_H
|