source-engine/materialsystem/stdshaders/wireframe_dx9.cpp
FluorescentCIAAfricanAmerican 3bf9df6b27 1
2020-04-22 12:56:21 -04:00

53 lines
1.2 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=====================================================================================//
#include "BaseVSShader.h"
#include "vertexlitgeneric_dx9_helper.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
DEFINE_FALLBACK_SHADER( Wireframe, Wireframe_DX9 )
BEGIN_VS_SHADER( Wireframe_DX9,
"Help for Wireframe_DX9" )
BEGIN_SHADER_PARAMS
END_SHADER_PARAMS
SHADER_FALLBACK
{
if ( IsWindows() && g_pHardwareConfig->GetDXSupportLevel() < 90 )
{
return "Wireframe_DX8";
}
return 0;
}
SHADER_INIT_PARAMS()
{
VertexLitGeneric_DX9_Vars_t vars;
InitParamsVertexLitGeneric_DX9( this, params, pMaterialName, false, vars );
SET_FLAGS( MATERIAL_VAR_NO_DEBUG_OVERRIDE );
SET_FLAGS( MATERIAL_VAR_NOFOG );
SET_FLAGS( MATERIAL_VAR_WIREFRAME );
}
SHADER_INIT
{
VertexLitGeneric_DX9_Vars_t vars;
InitVertexLitGeneric_DX9( this, params, false, vars );
}
SHADER_DRAW
{
VertexLitGeneric_DX9_Vars_t vars;
DrawVertexLitGeneric_DX9( this, params, pShaderAPI, pShaderShadow, false, vars, vertexCompression, pContextDataPtr );
}
END_SHADER