summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/example_model_dx9_helper.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/example_model_dx9_helper.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
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