summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/example_model_dx9_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'materialsystem/stdshaders/example_model_dx9_helper.h')
-rw-r--r--materialsystem/stdshaders/example_model_dx9_helper.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/example_model_dx9_helper.h b/materialsystem/stdshaders/example_model_dx9_helper.h
new file mode 100644
index 0000000..dfe2579
--- /dev/null
+++ b/materialsystem/stdshaders/example_model_dx9_helper.h
@@ -0,0 +1,46 @@
+//===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================
+//
+// Example shader that can be applied to models
+//
+//==================================================================================================
+
+#ifndef EXAMPLE_MODEL_DX9_HELPER_H
+#define EXAMPLE_MODEL_DX9_HELPER_H
+
+#include <string.h>
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class CBaseVSShader;
+class IMaterialVar;
+class IShaderDynamicAPI;
+class IShaderShadow;
+
+//-----------------------------------------------------------------------------
+// Init params/ init/ draw methods
+//-----------------------------------------------------------------------------
+struct ExampleModel_DX9_Vars_t
+{
+ ExampleModel_DX9_Vars_t() { memset( this, 0xFF, sizeof(*this) ); }
+
+ int m_nBaseTexture;
+ int m_nBaseTextureFrame;
+ int m_nBaseTextureTransform;
+ int m_nAlphaTestReference;
+ int m_nFlashlightTexture;
+ int m_nFlashlightTextureFrame;
+};
+
+void InitParamsExampleModel_DX9( CBaseVSShader *pShader, IMaterialVar** params,
+ const char *pMaterialName, ExampleModel_DX9_Vars_t &info );
+
+void InitExampleModel_DX9( CBaseVSShader *pShader, IMaterialVar** params,
+ ExampleModel_DX9_Vars_t &info );
+
+void DrawExampleModel_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI,
+ IShaderShadow* pShaderShadow,
+ ExampleModel_DX9_Vars_t &info, VertexCompressionType_t vertexCompression,
+ CBasePerMaterialContextData **pContextDataPtr );
+
+#endif // EXAMPLE_MODEL_DX9_HELPER_H