diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/disp_helpers.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/disp_helpers.cpp')
| -rw-r--r-- | engine/disp_helpers.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/disp_helpers.cpp b/engine/disp_helpers.cpp new file mode 100644 index 0000000..053d6d5 --- /dev/null +++ b/engine/disp_helpers.cpp @@ -0,0 +1,20 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + + +#include "disp_helpers.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +void CalcMaxNumVertsAndIndices( int power, int *nVerts, int *nIndices ) +{ + int sideLength = (1 << power) + 1; + *nVerts = sideLength * sideLength; + *nIndices = (sideLength - 1) * (sideLength - 1) * 2 * 3; +} + |