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.

264 lines
9.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: d3ddevice7obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3dDeviceObj.h : Declaration of the C_dxj_Direct3dDeviceObject
  11. #include "resource.h" // main symbols
  12. #define typedef__dxj_Direct3dDevice7 LPDIRECT3DDEVICE7
  13. /////////////////////////////////////////////////////////////////////////////
  14. // Direct
  15. //REVIEW -- using pointers to ID's is necessary because some compilers don't
  16. // like references as template arguments.
  17. class C_dxj_Direct3dDevice7Object :
  18. public I_dxj_Direct3dDevice7,
  19. //public CComCoClass<C_dxj_Direct3dDevice7Object, &CLSID__dxj_Direct3dDevice7>,
  20. public CComObjectRoot
  21. {
  22. public:
  23. C_dxj_Direct3dDevice7Object();
  24. virtual ~C_dxj_Direct3dDevice7Object();
  25. DWORD InternalAddRef();
  26. DWORD InternalRelease();
  27. BEGIN_COM_MAP(C_dxj_Direct3dDevice7Object)
  28. COM_INTERFACE_ENTRY(I_dxj_Direct3dDevice7)
  29. END_COM_MAP()
  30. // DECLARE_REGISTRY(CLSID__dxj_Direct3dDevice7, "DIRECT.Direct3dDevice7.3", "DIRECT.Direct3dDevice7.3", IDS_D3DDEVICE_DESC, THREADFLAGS_BOTH)
  31. DECLARE_AGGREGATABLE(C_dxj_Direct3dDevice7Object)
  32. // I_dxj_Direct3dDevice
  33. public:
  34. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  35. /* [in] */ IUnknown __RPC_FAR *lpdd);
  36. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  37. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  38. HRESULT STDMETHODCALLTYPE applyStateBlock(
  39. /* [in] */ long blockHandle);
  40. HRESULT STDMETHODCALLTYPE beginScene( void);
  41. HRESULT STDMETHODCALLTYPE beginStateBlock( void);
  42. HRESULT STDMETHODCALLTYPE captureStateBlock(
  43. /* [in] */ long blockHandle);
  44. HRESULT STDMETHODCALLTYPE clear(
  45. /* [in] */ long count,
  46. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *recs,
  47. /* [in] */ long flags,
  48. /* [in] */ long color,
  49. /* [in] */ float z,
  50. /* [in] */ long stencil);
  51. HRESULT STDMETHODCALLTYPE computeSphereVisibility(
  52. D3dVector __RPC_FAR *center,
  53. float __RPC_FAR *radius,
  54. /* [retval][out] */ long __RPC_FAR *returnVal);
  55. HRESULT STDMETHODCALLTYPE deleteStateBlock(
  56. /* [in] */ long blockHandle);
  57. HRESULT STDMETHODCALLTYPE drawIndexedPrimitive(
  58. /* [in] */ d3dPrimitiveType d3dpt,
  59. /* [in] */ long d3dvt,
  60. /* [in] */ void __RPC_FAR *vertices,
  61. /* [in] */ long VertexCount,
  62. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *indices,
  63. /* [in] */ long IndicesCount,
  64. /* [in] */ long flags);
  65. HRESULT STDMETHODCALLTYPE drawIndexedPrimitiveVB(
  66. /* [in] */ d3dPrimitiveType d3dpt,
  67. /* [in] */ I_dxj_Direct3dVertexBuffer7 __RPC_FAR *vertexBuffer,
  68. /* [in] */ long startVertex,
  69. /* [in] */ long numVertices,
  70. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *indexArray,
  71. /* [in] */ long indexcount,
  72. /* [in] */ long flags);
  73. HRESULT STDMETHODCALLTYPE drawPrimitive(
  74. /* [in] */ d3dPrimitiveType d3dpt,
  75. /* [in] */ long d3dvt,
  76. /* [in] */ void __RPC_FAR *vertices,
  77. /* [in] */ long VertexCount,
  78. /* [in] */ long flags);
  79. HRESULT STDMETHODCALLTYPE drawPrimitiveVB(
  80. /* [in] */ d3dPrimitiveType d3dpt,
  81. /* [in] */ I_dxj_Direct3dVertexBuffer7 __RPC_FAR *vertexBuffer,
  82. /* [in] */ long startVertex,
  83. /* [in] */ long numVertices,
  84. /* [in] */ long flags);
  85. HRESULT STDMETHODCALLTYPE endScene( void);
  86. HRESULT STDMETHODCALLTYPE endStateBlock(
  87. /* [in] */ long __RPC_FAR *blockHandle);
  88. HRESULT STDMETHODCALLTYPE getCaps(
  89. /* [out][in] */ D3dDeviceDesc7 __RPC_FAR *desc);
  90. HRESULT STDMETHODCALLTYPE getClipStatus(
  91. /* [out][in] */ D3dClipStatus __RPC_FAR *clipStatus);
  92. HRESULT STDMETHODCALLTYPE getDirect3D(
  93. /* [retval][out] */ I_dxj_Direct3d7 __RPC_FAR *__RPC_FAR *dev);
  94. HRESULT STDMETHODCALLTYPE getLight(
  95. /* [in] */ long LightIndex,
  96. /* [out][in] */ D3dLight7 __RPC_FAR *Light);
  97. HRESULT STDMETHODCALLTYPE getLightEnable(
  98. /* [in] */ long LightIndex,
  99. /* [retval][out] */ VARIANT_BOOL __RPC_FAR *b);
  100. HRESULT STDMETHODCALLTYPE getMaterial(
  101. /* [out][in] */ D3dMaterial7 __RPC_FAR *Material);
  102. HRESULT STDMETHODCALLTYPE getRenderState(
  103. /* [in] */ d3dRenderStateType state,
  104. /* [retval][out] */ long __RPC_FAR *renderstate);
  105. HRESULT STDMETHODCALLTYPE getRenderTarget(
  106. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *ppval);
  107. HRESULT STDMETHODCALLTYPE getTexture(
  108. /* [in] */ long stage,
  109. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *retv);
  110. HRESULT STDMETHODCALLTYPE getTextureFormatsEnum(
  111. /* [retval][out] */ I_dxj_Direct3DEnumPixelFormats __RPC_FAR *__RPC_FAR *retval);
  112. HRESULT STDMETHODCALLTYPE getTextureStageState(
  113. /* [in] */ long stage,
  114. /* [in] */ long state,
  115. /* [retval][out] */ long __RPC_FAR *val);
  116. HRESULT STDMETHODCALLTYPE getTransform(
  117. /* [in] */ d3dTransformStateType transformType,
  118. /* [out][in] */ D3dMatrix __RPC_FAR *matrix);
  119. HRESULT STDMETHODCALLTYPE getViewport(
  120. /* [out][in] */ D3dViewport7 __RPC_FAR *viewport);
  121. HRESULT STDMETHODCALLTYPE lightEnable(
  122. /* [in] */ long LightIndex,
  123. /* [in] */ VARIANT_BOOL b);
  124. HRESULT STDMETHODCALLTYPE load(
  125. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *DestTex,
  126. /* [in] */ long xDest,
  127. /* [in] */ long yDest,
  128. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *SrcTex,
  129. /* [in] */ Rect __RPC_FAR *rcSrcRect,
  130. /* [in] */ long flags);
  131. HRESULT STDMETHODCALLTYPE multiplyTransform(
  132. /* [in] */ long dstTransfromStateType,
  133. /* [out][in] */ D3dMatrix __RPC_FAR *matrix);
  134. HRESULT STDMETHODCALLTYPE preLoad(
  135. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *surf);
  136. HRESULT STDMETHODCALLTYPE setClipStatus(
  137. /* [in] */ D3dClipStatus __RPC_FAR *clipStatus);
  138. HRESULT STDMETHODCALLTYPE setLight(
  139. /* [in] */ long LightIndex,
  140. /* [in] */ D3dLight7 __RPC_FAR *Light);
  141. HRESULT STDMETHODCALLTYPE setMaterial(
  142. /* [in] */ D3dMaterial7 __RPC_FAR *mat);
  143. HRESULT STDMETHODCALLTYPE setRenderState(
  144. /* [in] */ d3dRenderStateType state,
  145. /* [in] */ long renderstate);
  146. HRESULT STDMETHODCALLTYPE setRenderTarget(
  147. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *surface);
  148. HRESULT STDMETHODCALLTYPE setTexture(
  149. /* [in] */ long stage,
  150. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *texture);
  151. HRESULT STDMETHODCALLTYPE setTextureStageState(
  152. /* [in] */ long stage,
  153. /* [in] */ long state,
  154. /* [in] */ long value);
  155. HRESULT STDMETHODCALLTYPE setTransform(
  156. /* [in] */ d3dTransformStateType transformType,
  157. /* [in] */ D3dMatrix __RPC_FAR *matrix);
  158. HRESULT STDMETHODCALLTYPE setViewport(
  159. /* [in] */ D3dViewport7 __RPC_FAR *viewport);
  160. HRESULT STDMETHODCALLTYPE validateDevice(
  161. /* [retval][out] */ long __RPC_FAR *passes);
  162. HRESULT STDMETHODCALLTYPE setTextureStageStateSingle(
  163. /* [in] */ long stage,
  164. /* [in] */ long state,
  165. /* [in] */ float value);
  166. HRESULT STDMETHODCALLTYPE getTextureStageStateSingle(
  167. /* [in] */ long stage,
  168. /* [in] */ long state,
  169. /* [in] */ float *value);
  170. HRESULT STDMETHODCALLTYPE getInfo (
  171. /* [in] */ long lDevInfoID,
  172. /* [out][in] */ void __RPC_FAR *DevInfoType,
  173. /* [in] */ long lSize);
  174. HRESULT STDMETHODCALLTYPE setRenderStateSingle(
  175. /* [in] */ d3dRenderStateType state,
  176. /* [in] */ float renderstate);
  177. HRESULT STDMETHODCALLTYPE getRenderStateSingle(
  178. /* [in] */ d3dRenderStateType state,
  179. /* [in] */ float *renderstate);
  180. HRESULT STDMETHODCALLTYPE getDeviceGuid(
  181. /* [out,retval] */ BSTR *ret);
  182. HRESULT STDMETHODCALLTYPE createStateBlock( long flags, long *retv);
  183. HRESULT STDMETHODCALLTYPE setClipPlane( long index, float A, float B, float C, float D);
  184. HRESULT STDMETHODCALLTYPE getClipPlane( long index, float *A, float *B, float *C, float *D);
  185. ////////////////////////////////////////////////////////////////////////////////////
  186. private:
  187. DECL_VARIABLE(_dxj_Direct3dDevice7);
  188. public:
  189. DX3J_GLOBAL_LINKS( _dxj_Direct3dDevice7)
  190. void *parent2;
  191. };