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.

209 lines
8.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: d3ddevice3obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3dDeviceObj.h : Declaration of the C_dxj_Direct3dDeviceObject
  11. #include "resource.h" // main symbols
  12. #define typedef__dxj_Direct3dDevice3 LPDIRECT3DDEVICE3
  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_Direct3dDevice3Object :
  18. public I_dxj_Direct3dDevice3,
  19. //public CComCoClass<C_dxj_Direct3dDevice3Object, &CLSID__dxj_Direct3dDevice3>,
  20. public CComObjectRoot
  21. {
  22. public:
  23. C_dxj_Direct3dDevice3Object();
  24. virtual ~C_dxj_Direct3dDevice3Object();
  25. DWORD InternalAddRef();
  26. DWORD InternalRelease();
  27. BEGIN_COM_MAP(C_dxj_Direct3dDevice3Object)
  28. COM_INTERFACE_ENTRY(I_dxj_Direct3dDevice3)
  29. END_COM_MAP()
  30. // DECLARE_REGISTRY(CLSID__dxj_Direct3dDevice3, "DIRECT.Direct3dDevice3.3", "DIRECT.Direct3dDevice3.3", IDS_D3DDEVICE_DESC, THREADFLAGS_BOTH)
  31. DECLARE_AGGREGATABLE(C_dxj_Direct3dDevice3Object)
  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 addViewport(
  39. /* [in] */ I_dxj_Direct3dViewport3 __RPC_FAR *viewport);
  40. HRESULT STDMETHODCALLTYPE deleteViewport(
  41. /* [in] */ I_dxj_Direct3dViewport3 __RPC_FAR *vport);
  42. HRESULT STDMETHODCALLTYPE beginIndexed(
  43. /* [in] */ d3dPrimitiveType d3dpt,
  44. /* [in] */ d3dVertexType d3dvt,
  45. /* [in] */ void __RPC_FAR *verts,
  46. /* [in] */ long vertexCount,
  47. /* [in] */ long flags);
  48. HRESULT STDMETHODCALLTYPE drawIndexedPrimitive(
  49. /* [in] */ d3dPrimitiveType d3dpt,
  50. /* [in] */ d3dVertexType d3dvt,
  51. /* [in] */ void __RPC_FAR *vertices,
  52. /* [in] */ long VertexCount,
  53. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *indices,
  54. /* [in] */ long IndicesCount,
  55. /* [in] */ long flags);
  56. HRESULT STDMETHODCALLTYPE drawPrimitive(
  57. /* [in] */ d3dPrimitiveType d3dpt,
  58. /* [in] */ d3dVertexType d3dvt,
  59. /* [in] */ void __RPC_FAR *vertices,
  60. /* [in] */ long VertexCount,
  61. /* [in] */ long flags);
  62. HRESULT STDMETHODCALLTYPE vertex(
  63. /* [in] */ void __RPC_FAR *vertex);
  64. HRESULT STDMETHODCALLTYPE getDirect3D(
  65. /* [retval][out] */ I_dxj_Direct3d3 __RPC_FAR *__RPC_FAR *dev);
  66. HRESULT STDMETHODCALLTYPE getCurrentViewport(
  67. /* [retval][out] */ I_dxj_Direct3dViewport3 __RPC_FAR *__RPC_FAR *ret);
  68. HRESULT STDMETHODCALLTYPE nextViewport(
  69. /* [in] */ I_dxj_Direct3dViewport3 __RPC_FAR *vp1,
  70. /* [in] */ long flags,
  71. /* [retval][out] */ I_dxj_Direct3dViewport3 __RPC_FAR *__RPC_FAR *vp2);
  72. HRESULT STDMETHODCALLTYPE setCurrentViewport(
  73. /* [in] */ I_dxj_Direct3dViewport3 __RPC_FAR *viewport);
  74. HRESULT STDMETHODCALLTYPE setRenderTarget(
  75. /* [in] */ I_dxj_DirectDrawSurface4 __RPC_FAR *surface);
  76. HRESULT STDMETHODCALLTYPE getRenderTarget(
  77. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *ppval);
  78. HRESULT STDMETHODCALLTYPE begin(
  79. /* [in] */ d3dPrimitiveType d3dpt,
  80. /* [in] */ d3dVertexType d3dvt,
  81. /* [in] */ long flags);
  82. HRESULT STDMETHODCALLTYPE beginScene( void);
  83. HRESULT STDMETHODCALLTYPE end();
  84. HRESULT STDMETHODCALLTYPE endScene( void);
  85. HRESULT STDMETHODCALLTYPE getTextureFormatsEnum(
  86. /* [retval][out] */ I_dxj_D3DEnumPixelFormats __RPC_FAR *__RPC_FAR *retval);
  87. HRESULT STDMETHODCALLTYPE getCaps(
  88. /* [out][in] */ D3dDeviceDesc __RPC_FAR *hwDesc,
  89. /* [out][in] */ D3dDeviceDesc __RPC_FAR *helDesc);
  90. HRESULT STDMETHODCALLTYPE getClipStatus(
  91. /* [out][in] */ D3dClipStatus __RPC_FAR *clipStatus);
  92. HRESULT STDMETHODCALLTYPE getLightState(
  93. /* [in] */ long state,
  94. /* [retval][out] */ long __RPC_FAR *lightstate);
  95. HRESULT STDMETHODCALLTYPE getRenderState(
  96. /* [in] */ long state,
  97. /* [retval][out] */ long __RPC_FAR *renderstate);
  98. HRESULT STDMETHODCALLTYPE getStats(
  99. /* [out][in] */ D3dStats __RPC_FAR *stat);
  100. HRESULT STDMETHODCALLTYPE getTransform(
  101. /* [in] */ long transformType,
  102. /* [out][in] */ D3dMatrix __RPC_FAR *matrix);
  103. HRESULT STDMETHODCALLTYPE index(
  104. /* [in] */ short vertexIndex);
  105. HRESULT STDMETHODCALLTYPE multiplyTransform(
  106. /* [in] */ long dstTransfromStateType,
  107. /* [out][in] */ D3dMatrix __RPC_FAR *matrix);
  108. HRESULT STDMETHODCALLTYPE setClipStatus(
  109. /* [in] */ D3dClipStatus __RPC_FAR *clipStatus);
  110. HRESULT STDMETHODCALLTYPE setLightState(
  111. /* [in] */ long state,
  112. /* [in] */ long lightstate);
  113. HRESULT STDMETHODCALLTYPE setRenderState(
  114. /* [in] */ long state,
  115. /* [in] */ long renderstate);
  116. HRESULT STDMETHODCALLTYPE setTransform(
  117. /* [in] */ d3dTransformStateType transformType,
  118. /* [in] */ D3dMatrix __RPC_FAR *matrix);
  119. HRESULT STDMETHODCALLTYPE computeSphereVisibility(
  120. D3dVector __RPC_FAR *center,
  121. float __RPC_FAR *radi,
  122. /* [retval][out] */ long __RPC_FAR *returnVal);
  123. HRESULT STDMETHODCALLTYPE drawIndexedPrimitiveVB(
  124. /* [in] */ d3dPrimitiveType d3dpt,
  125. /* [in] */ I_dxj_Direct3dVertexBuffer __RPC_FAR *vertexBuffer,
  126. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *indexArray,
  127. /* [in] */ long indexcount,
  128. /* [in] */ long flags);
  129. HRESULT STDMETHODCALLTYPE drawPrimitiveVB(
  130. /* [in] */ d3dPrimitiveType d3dpt,
  131. /* [in] */ I_dxj_Direct3dVertexBuffer __RPC_FAR *vertexBuffer,
  132. /* [in] */ long startVertex,
  133. /* [in] */ long numVertices,
  134. /* [in] */ long flags);
  135. HRESULT STDMETHODCALLTYPE validateDevice(
  136. /* [retval][out] */ long __RPC_FAR *passes);
  137. HRESULT STDMETHODCALLTYPE getTexture(
  138. /* [in] */ long stage,
  139. /* [retval][out] */ I_dxj_Direct3dTexture2 __RPC_FAR *__RPC_FAR *retv);
  140. HRESULT STDMETHODCALLTYPE getTextureStageState(
  141. /* [in] */ long stage,
  142. /* [in] */ long state,
  143. /* [retval][out] */ long __RPC_FAR *retv);
  144. HRESULT STDMETHODCALLTYPE setTexture(
  145. /* [in] */ long stage,
  146. /* [in] */ I_dxj_Direct3dTexture2 __RPC_FAR *texture);
  147. HRESULT STDMETHODCALLTYPE setTextureStageState(
  148. /* [in] */ long stage,
  149. /* [in] */ long state,
  150. /* [in] */ long value);
  151. ////////////////////////////////////////////////////////////////////////////////////
  152. private:
  153. DECL_VARIABLE(_dxj_Direct3dDevice3);
  154. public:
  155. DX3J_GLOBAL_LINKS( _dxj_Direct3dDevice3)
  156. void *parent2;
  157. };