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.

63 lines
2.7 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: tlhal.h
  6. * Content: Support code for HALs with hardware transform & light
  7. *
  8. ***************************************************************************/
  9. #ifndef _TLHAL_H_
  10. #define _TLHAL_H_
  11. #include "drawprim.hpp"
  12. //---------------------------------------------------------------------
  13. // DirectX7 device
  14. //
  15. class CDirect3DDevice7 : public CDirect3DDeviceIDP2
  16. {
  17. public:
  18. CDirect3DDevice7() { deviceType = D3DDEVTYPE_DX7HAL; m_tssMax = D3DTSS_MAX;}
  19. ~CDirect3DDevice7() { CleanupTextures(); }
  20. HRESULT TexBltI(LPDDRAWI_DDRAWSURFACE_LCL lpDst,
  21. LPDDRAWI_DDRAWSURFACE_LCL lpSrc,
  22. LPPOINT p, RECTL *r, DWORD dwFlags);
  23. HRESULT SetPriorityI(LPDDRAWI_DDRAWSURFACE_LCL lpDst, DWORD dwPriority);
  24. HRESULT SetTexLODI(LPDDRAWI_DDRAWSURFACE_LCL lpDst, DWORD dwLOD);
  25. HRESULT Init(REFCLSID riid, LPDIRECT3DI lpD3DI, LPDIRECTDRAWSURFACE lpDDS,
  26. IUnknown* pUnkOuter, LPUNKNOWN* lplpD3DDevice);
  27. void WriteStateSetToDevice(D3DSTATEBLOCKTYPE);
  28. HRESULT UpdatePalette(DWORD,DWORD,DWORD,LPPALETTEENTRY);
  29. HRESULT SetPalette(DWORD,DWORD,DWORD);
  30. HRESULT UpdateTextures();
  31. HRESULT GetTextureDDIHandle(LPDIRECT3DTEXTUREI lpTexI, D3DTEXTUREHANDLE *hTex);
  32. void SetRenderTargetI(LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE);
  33. void SetRenderTargetINoFlush(LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE);
  34. bool CanDoTexBlt(LPDDRAWI_DDRAWSURFACE_LCL lpDDSSrcSubFace_lcl,
  35. LPDDRAWI_DDRAWSURFACE_LCL lpDDSDstSubFace_lcl);
  36. void ClearI(DWORD dwFlags, DWORD clrCount, D3DCOLOR dwColor, D3DVALUE dvZ, DWORD dwStencil);
  37. HRESULT D3DAPI GetInfo(DWORD dwDevInfoID, LPVOID pDevInfoStruct, DWORD dwSize);
  38. };
  39. //---------------------------------------------------------------------
  40. // Device, that supports hardware Transformation and Lighting
  41. //
  42. class CDirect3DDeviceTL : public CDirect3DDevice7
  43. {
  44. public:
  45. CDirect3DDeviceTL();
  46. ~CDirect3DDeviceTL() { CleanupTextures(); }
  47. void LightEnableI(DWORD dwLightIndex, BOOL bEnable);
  48. HRESULT Init(REFCLSID riid, LPDIRECT3DI lpD3DI, LPDIRECTDRAWSURFACE lpDDS,
  49. IUnknown* pUnkOuter, LPUNKNOWN* lplpD3DDevice);
  50. void UpdateDrvViewInfo(LPD3DVIEWPORT7 lpVwpData);
  51. void SetTransformI(D3DTRANSFORMSTATETYPE, LPD3DMATRIX);
  52. HRESULT SetupFVFData(DWORD *pdwInpVertexSize);
  53. protected:
  54. HRESULT ProcessPrimitive(__PROCPRIMOP op);
  55. void LightChanged(DWORD dwLightIndex);
  56. void MaterialChanged();
  57. void SetClipPlaneI(DWORD dwPlaneIndex, D3DVALUE* pPlaneEquation);
  58. };
  59. #endif /* _TLHAL_H_ */