initial
This commit is contained in:
61
engine/gl_cvars.h
Normal file
61
engine/gl_cvars.h
Normal file
@@ -0,0 +1,61 @@
|
||||
//===== Copyright <20> 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
|
||||
Reference in New Issue
Block a user