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.

105 lines
3.7 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: D3D8sddi.h
  6. * Content: Defines the interface between the ddi thunk layer
  7. * and the refrast/RGB HEL layer..
  8. *@@BEGIN_MSINTERNAL
  9. * History:
  10. * Date By Reason
  11. * ==== == ======
  12. * 04-nov-99 smac initial implementation
  13. *@@END_MSINTERNAL
  14. *
  15. ***************************************************************************/
  16. #ifndef __D3D8SW_INCLUDED__
  17. #define __D3D8SW_INCLUDED__
  18. // Surface types
  19. #define SWSURF_SURFACE 0x00000001
  20. #define SWSURF_VOLUME 0x00000002
  21. #define SWSURF_MIPMAP 0x00000004
  22. #define SWSURF_MIPVOLUME 0x00000008
  23. #define SWSURF_CUBEMAP 0x00000010
  24. #define SWSURF_VERTEXBUFFER 0x00000020
  25. #define SWSURF_OPTIMIZERVERTEXBUFFER 0x00000040
  26. #define SWSURF_INDEXBUFFER 0x00000080
  27. #define SWSURF_COMMANDBUFFER 0x00000100
  28. // Flags
  29. #define SWFLAG_D3DEXENDEDCAPS 0x00000001
  30. #define SWFLAG_D3DGLOBALDRIVERDATA 0x00000002
  31. #define SWFLAG_D3DCAPS8 0x00000004
  32. typedef struct _D3D8_SWCALLBACKS
  33. {
  34. // From Callbacks
  35. LPD3DHAL_CONTEXTCREATECB CreateContext;
  36. LPD3DHAL_CONTEXTDESTROYCB ContextDestroy;
  37. LPD3DHAL_CONTEXTDESTROYALLCB ContextDestroyAll;
  38. LPD3DHAL_SCENECAPTURECB SceneCapture;
  39. LPD3DHAL_RENDERSTATECB RenderState;
  40. LPD3DHAL_RENDERPRIMITIVECB RenderPrimitive;
  41. LPD3DHAL_TEXTURECREATECB TextureCreate;
  42. LPD3DHAL_TEXTUREDESTROYCB TextureDestroy;
  43. LPD3DHAL_TEXTURESWAPCB TextureSwap;
  44. LPD3DHAL_TEXTUREGETSURFCB TextureGetSurf;
  45. LPD3DHAL_GETSTATECB GetState;
  46. // From Callbacks2
  47. LPD3DHAL_SETRENDERTARGETCB SetRenderTarget;
  48. LPD3DHAL_CLEARCB Clear;
  49. LPD3DHAL_DRAWONEPRIMITIVECB DrawOnePrimitive;
  50. LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB DrawOneIndexedPrimitive;
  51. LPD3DHAL_DRAWPRIMITIVESCB DrawPrimitives;
  52. // From Callbacks3
  53. LPD3DHAL_CLEAR2CB Clear2;
  54. LPD3DHAL_VALIDATETEXTURESTAGESTATECB ValidateTextureStageState;
  55. LPD3DHAL_DRAWPRIMITIVES2CB DrawPrimitives2;
  56. // From MiscCallbacks in DDraw
  57. LPDDHAL_GETDRIVERSTATE GetDriverState;
  58. LPDDHAL_CREATESURFACEEX CreateSurfaceEx;
  59. // DDraw Callbacks
  60. LPDDHAL_CREATESURFACE CreateSurface;
  61. LPDDHALSURFCB_DESTROYSURFACE DestroySurface;
  62. LPDDHALSURFCB_LOCK Lock;
  63. LPDDHALSURFCB_UNLOCK Unlock;
  64. } D3D8_SWCALLBACKS, * PD3D8_SWCALLBACKS;
  65. #ifdef __cplusplus
  66. extern "C" {
  67. #endif
  68. HRESULT APIENTRY D3D8GetSWInfo(
  69. D3DCAPS8* pCaps,
  70. PD3D8_SWCALLBACKS pCallbacks,
  71. DWORD* pNumTextures,
  72. DDSURFACEDESC** ppTexList
  73. );
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. // Prototypes required to hook the DDI layer (used by RefRast and the HEL
  78. #define D3D8_REFRASTNAME "D3DREF8.DLL"
  79. #define D3D8HOOK_GETSWINFOPROCNAME "D3D8GetSWInfo"
  80. typedef HRESULT (WINAPI * PD3D8GetSWInfo)(D3DCAPS8* pCaps,
  81. PD3D8_SWCALLBACKS pCallbacks,
  82. DWORD* pNumTextures,
  83. DDSURFACEDESC** ppTexList
  84. );
  85. #endif