Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
4.2 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #include "shadershadowdx10.h"
  9. #include "utlvector.h"
  10. #include "materialsystem/imaterialsystem.h"
  11. #include "IHardwareConfigInternal.h"
  12. #include "shadersystem.h"
  13. #include "shaderapi/ishaderutil.h"
  14. #include "materialsystem/imesh.h"
  15. #include "tier0/dbg.h"
  16. #include "materialsystem/idebugtextureinfo.h"
  17. // NOTE: This has to be the last file included!
  18. #include "tier0/memdbgon.h"
  19. //-----------------------------------------------------------------------------
  20. // Class Factory
  21. //-----------------------------------------------------------------------------
  22. static CShaderShadowDx10 s_ShaderShadow;
  23. CShaderShadowDx10 *g_pShaderShadowDx10 = &s_ShaderShadow;
  24. EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CShaderShadowDx10, IShaderShadow,
  25. SHADERSHADOW_INTERFACE_VERSION, s_ShaderShadow )
  26. //-----------------------------------------------------------------------------
  27. // The shader shadow interface
  28. //-----------------------------------------------------------------------------
  29. CShaderShadowDx10::CShaderShadowDx10()
  30. {
  31. m_IsTranslucent = false;
  32. m_IsAlphaTested = false;
  33. m_bIsDepthWriteEnabled = true;
  34. m_bUsesVertexAndPixelShaders = false;
  35. }
  36. CShaderShadowDx10::~CShaderShadowDx10()
  37. {
  38. }
  39. // Sets the default *shadow* state
  40. void CShaderShadowDx10::SetDefaultState()
  41. {
  42. m_IsTranslucent = false;
  43. m_IsAlphaTested = false;
  44. m_bIsDepthWriteEnabled = true;
  45. m_bUsesVertexAndPixelShaders = false;
  46. }
  47. // Methods related to depth buffering
  48. void CShaderShadowDx10::DepthFunc( ShaderDepthFunc_t depthFunc )
  49. {
  50. }
  51. void CShaderShadowDx10::EnableDepthWrites( bool bEnable )
  52. {
  53. m_bIsDepthWriteEnabled = bEnable;
  54. }
  55. void CShaderShadowDx10::EnableDepthTest( bool bEnable )
  56. {
  57. }
  58. void CShaderShadowDx10::EnablePolyOffset( PolygonOffsetMode_t nOffsetMode )
  59. {
  60. }
  61. // Suppresses/activates color writing
  62. void CShaderShadowDx10::EnableColorWrites( bool bEnable )
  63. {
  64. }
  65. // Suppresses/activates alpha writing
  66. void CShaderShadowDx10::EnableAlphaWrites( bool bEnable )
  67. {
  68. }
  69. // Methods related to alpha blending
  70. void CShaderShadowDx10::EnableBlending( bool bEnable )
  71. {
  72. m_IsTranslucent = bEnable;
  73. }
  74. void CShaderShadowDx10::EnableBlendingForceOpaque( bool bEnable )
  75. {
  76. m_IsTranslucent = bEnable;
  77. }
  78. void CShaderShadowDx10::BlendFunc( ShaderBlendFactor_t srcFactor, ShaderBlendFactor_t dstFactor )
  79. {
  80. }
  81. void CShaderShadowDx10::BlendOp( ShaderBlendOp_t blendOp )
  82. {
  83. }
  84. void CShaderShadowDx10::BlendOpSeparateAlpha( ShaderBlendOp_t blendOp )
  85. {
  86. }
  87. void CShaderShadowDx10::SetShadowDepthFiltering( Sampler_t stage )
  88. {
  89. }
  90. // Alpha testing
  91. void CShaderShadowDx10::EnableAlphaTest( bool bEnable )
  92. {
  93. m_IsAlphaTested = bEnable;
  94. }
  95. void CShaderShadowDx10::AlphaFunc( ShaderAlphaFunc_t alphaFunc, float alphaRef /* [0-1] */ )
  96. {
  97. }
  98. // Wireframe/filled polygons
  99. void CShaderShadowDx10::PolyMode( ShaderPolyModeFace_t face, ShaderPolyMode_t polyMode )
  100. {
  101. }
  102. // Back face culling
  103. void CShaderShadowDx10::EnableCulling( bool bEnable )
  104. {
  105. }
  106. // Alpha to coverage
  107. void CShaderShadowDx10::EnableAlphaToCoverage( bool bEnable )
  108. {
  109. }
  110. // Indicates the vertex format for use with a vertex shader
  111. // The flags to pass in here come from the VertexFormatFlags_t enum
  112. // If pTexCoordDimensions is *not* specified, we assume all coordinates
  113. // are 2-dimensional
  114. void CShaderShadowDx10::VertexShaderVertexFormat( unsigned int flags,
  115. int numTexCoords, int* pTexCoordDimensions,
  116. int userDataSize )
  117. {
  118. }
  119. void CShaderShadowDx10::EnableTexture( Sampler_t stage, bool bEnable )
  120. {
  121. }
  122. void CShaderShadowDx10::EnableVertexTexture( VertexTextureSampler_t stage, bool bEnable )
  123. {
  124. }
  125. // Sets the vertex and pixel shaders
  126. void CShaderShadowDx10::SetVertexShader( const char *pShaderName, int vshIndex )
  127. {
  128. m_bUsesVertexAndPixelShaders = ( pShaderName != NULL );
  129. }
  130. void CShaderShadowDx10::EnableBlendingSeparateAlpha( bool bEnable )
  131. {
  132. }
  133. void CShaderShadowDx10::SetPixelShader( const char *pShaderName, int pshIndex )
  134. {
  135. m_bUsesVertexAndPixelShaders = ( pShaderName != NULL );
  136. }
  137. void CShaderShadowDx10::BlendFuncSeparateAlpha( ShaderBlendFactor_t srcFactor, ShaderBlendFactor_t dstFactor )
  138. {
  139. }