Leaked source code of windows server 2003
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.

68 lines
1.6 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: pshader.hpp
  6. * Content: Direct3D pixel shader internal include file
  7. *
  8. *
  9. ***************************************************************************/
  10. #ifndef _PSHADER_HPP
  11. #define _PSHADER_HPP
  12. #include "d3dfe.hpp"
  13. #include "hmgr.hpp"
  14. struct PVM_WORD
  15. {
  16. union
  17. {
  18. struct
  19. {
  20. D3DVALUE x, y, z, w;
  21. };
  22. D3DVALUE v[4];
  23. };
  24. };
  25. struct CONST_DEF
  26. {
  27. float f[4];
  28. UINT RegNum;
  29. };
  30. //-----------------------------------------------------------------------------
  31. //
  32. // CPShader: Pixel Shader Class
  33. //
  34. //-----------------------------------------------------------------------------
  35. class CPShader : public CD3DBaseObj
  36. {
  37. public:
  38. DWORD* m_pCode;
  39. UINT m_dwCodeSize;
  40. DWORD* m_pCodeOrig;
  41. UINT m_dwCodeSizeOrig;
  42. DWORD m_dwNumConstDefs;
  43. CONST_DEF* m_pConstDefs;
  44. CPShader(void)
  45. {
  46. m_pCodeOrig = NULL;
  47. m_dwCodeSizeOrig = 0x0;
  48. m_pCode = m_pCodeOrig;
  49. m_dwCodeSize = m_dwCodeSizeOrig;
  50. m_dwNumConstDefs = 0;
  51. m_pConstDefs = NULL;
  52. }
  53. ~CPShader()
  54. {
  55. if (NULL != m_pCode) delete[] m_pCode;
  56. if (NULL != m_pCodeOrig) delete[] m_pCodeOrig;
  57. if (NULL != m_pConstDefs) delete[] m_pConstDefs;
  58. }
  59. HRESULT Initialize(CONST DWORD* pCode, D3DDEVTYPE DevType);
  60. };
  61. typedef CPShader *LPPSHADER;
  62. #endif _PSHADER_HPP