home *** CD-ROM | disk | FTP | other *** search
/ PC Open 15 / PCOPEN15.ISO / SDK / DOCS / README / D3DRM.TXT < prev    next >
Encoding:
Text File  |  1997-07-14  |  7.8 KB  |  231 lines

  1. ************************************
  2. ***                              ***
  3. ***                              ***
  4. *** Direct3D Retained Mode Notes ***
  5. *** DirectX 5                    ***
  6. ***                              ***
  7. ***                              ***
  8. ************************************
  9.  
  10. Last updated  June 24, 1997 - DirectX 5 Release
  11.  
  12. Interface Issues
  13. ================
  14.  
  15. With the exception of the IDirect3DRM2 interface, all
  16. interfaces now inherit from the previous interface.
  17. I.e. IDirect3DRMDevice2 inherits from IDirect3DRMDevice.  This means
  18. that an application can legally (in C++) pass a IDirect3DRMDevice2
  19. pointer into a function that is expecting an IDirect3DRMDevice
  20. interface.  In C it is now legal to cast an IDirect3DRMDevice2 to a
  21. IDirect3DRMDevice.
  22.  
  23. New Interfaces
  24. ==============
  25.  
  26. The COM model that Direct3D Retained Mode uses specifies that
  27. additional functionality is provided by providing new interfaces.
  28. This release of D3DRM provides the following new interfaces:
  29.  
  30. IDirect3DRM2
  31. IDirect3DRMDevice2
  32. IDirect3DRMFrame2
  33. IDirect3DRMTexture2
  34. IDirect3DRMMeshBuilder2
  35. IDirect3DRMInterpolator
  36. IDirect3DRMProgressiveMesh
  37.  
  38.  
  39. The changes (and additional functionality) are detailed here.
  40.  
  41.  
  42. IDirect3DRM2
  43. ============
  44.  
  45. New Members
  46. -----------
  47. This interface adds a new member function CreateProgressiveMesh().
  48. See the section on progressive meshes for information about this new
  49. object.
  50.  
  51. New Functionality
  52. -----------------
  53.  
  54. Device behaviour
  55.  
  56. The new IDirect3DRM2 interface creates devices based on the new
  57. functionality provided by the Immediate Mode IDirect3D2 interface.
  58. Immediate Mode devices can be created in two ways.
  59.  
  60. 1) By calling QueryInterface from an IDirectDrawSurface.  In this case
  61.    the IDirect3DDevice cannot be queried for the new IDirect3DDevice2
  62.    interface.
  63.  
  64. 2) By caling IDirect3D2::CreateDevice.  This method creates an
  65.    immediate mode device and returns a pointer to an IDirect3DDevice2
  66.    interface. This interface can then be queried for an IDirect3DDevice
  67.    interface if required.
  68.    The difference with an immediate mode device created in this
  69.    fashion is that it cannot be queried for an IDirectDrawSurface as the
  70.    interface was not queried from an IDirectDrawSurface in the first
  71.    place (as in case 1).
  72.    Therefore, the immediate mode device returned by the retained mode
  73.    IDirect3DRMDevice::GetDirect3DDevice() member cannot be queried for the
  74.    underlying IDirectDrawSurface in this case.
  75.  
  76. The original IDirect3DRM interface creates devices using method 1 and
  77. the IDirect3DRM2 interface creates devices using method 2.  In each
  78. case, both the original and new retained mode device interfaces are
  79. available.
  80.  
  81. Texture behaviour
  82. -----------------
  83. Textures loaded from bmp files in the IDirect3DRM interface were
  84. loaded upside-down.  This has been corrected in the IDirect3DRM2
  85. interface.
  86.  
  87.  
  88. IDirect3DRMDevice2
  89. ==================
  90.  
  91. New members
  92. -----------
  93. SetRenderMode() and GetRenderMode() allow the application to specify
  94. if true alpha blending is to be used (if available) as opposed to
  95. stippled alpha.  This functionality depends on the new immediate mode
  96. device functionality, therefore the device must be created by the
  97. IDirect3DRM2 interface.
  98.  
  99.  
  100. IDirect3DRMTexture2
  101. ===================
  102.  
  103. New members
  104. -----------
  105. GenerateMIPMap() generates a mipmap stack for the current texture and
  106. also generates filtered images.  This is provided for applications
  107. that do not want to provide their own MIP levels.
  108.  
  109. New behaviour
  110. -------------
  111. The InitFromXXX() members when initialized from bmp files load the
  112. images the correct way up.
  113.  
  114. Textures now support alpha, but in order to gain alpha functionality they
  115. must be created from the IDirect3DRM2 interface.  This is so old behavior
  116. is maintained for old applications using the IDirect3DRM.
  117.  
  118.  
  119. IDirect3DRMMeshBuilder2
  120. =======================
  121.  
  122. New behaviour
  123. -------------
  124. The GenerateNormals2() takes an extra argument for a crease
  125. angle.  The flags field specifies whether this should be used or not.
  126.  
  127.  
  128. IDirect3DRMFrame2
  129. =================
  130.  
  131. New members
  132. -----------
  133.  
  134. GetMaterial() and SetMaterial() allow the application to specify a
  135. material to be inherited down the frame hierarchy.
  136.  
  137. GetBox(), SetBox(), GetBoxEnable() and SetBoxEnable() allow the
  138. application to provide a bounding box for hierarchy culling.
  139. You *must* call SetBox() before SetBoxEnable().
  140.  
  141. GetHierarchyBox() allows an application to obtain the bounding box for
  142. an entire hierarchy.
  143.  
  144. GetAxes() and SetAxes() allow the application to specify which vectors
  145. are aligned with the direction and up vectors supplied to
  146. SetOrientation().
  147. The defaults are dir=(0, 0, 1) and up=(0, 1, 0).
  148.  
  149. GetInheritAxes() and SetInheritAxes() allow the application to specify
  150. if a frame is to inherit it's parents axes.  The default is to
  151. inherit.
  152.  
  153. RayPick() allows an application to perform true ray picking.  The
  154. member traverses the hierarchy starting at the frame and calculates
  155. intersections with any visuals with the ray specified by dvPosition
  156. and dvDirection in the coordinate space specifed by the frame given as
  157. a reference.
  158.  
  159. New behaviour
  160. -------------
  161. IDirect3DRMFrame::GetOrientation() incorrectly obtains an orientation if the
  162. reference frame is not the parent frame.  In order to get the correct result
  163. use the IDirect3DRMFrame2::GetOrientation() method.
  164.  
  165.  
  166. New Flags for Viewports
  167. =======================
  168.  
  169. It is now possible to use a right handed coordinate space by
  170. specifying D3DRMPROJECT_RIGHTHANDPERSPECTIVE or
  171. D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC to the
  172. IDirect3DRMViewport::SetProjection member.
  173.  
  174.  
  175. Interpolators
  176. =============
  177.  
  178. Interpolators provide a way of storing and playing back object actions
  179. with automatic in-betweening of parameter values.  Their functionality
  180. is a superset of the Animation interface and has been generalized to
  181. cover several D3DRM object types.  Please see the online documentation
  182. for a full treatment on interpolators, and also the "morph" sample.
  183.  
  184. Progressive Meshes
  185. ==================
  186.  
  187. Progressive Meshes are a new type of visual that allow progressive
  188. rendering.  The mesh can be set to any level of face or vertex
  189. detail.  In addition, these visuals can be rendered before all the
  190. data has been loaded.  In order to facilitate this, the
  191. IDirect3DRMProgressiveMesh::Load() member accepts a new load option:
  192. D3DRMLOAD_ASYNCHRONOUS.  The application can then provide events to
  193. the progressive mesh object that will be signalled at various stages
  194. of the load process.
  195.  
  196. Loading from a URL
  197. ==================
  198. When loading a mesh from a URL, if no texture callback is provided,
  199. Retained Mode will attempt to load the texture via URL.  The sematics
  200. for generating the URL for a texture are the same as for a standard
  201. web document.  I.e. if the texture does not contain "http://" then the
  202. path is assumed to be relative from where the original object was
  203. loaded.
  204.  
  205.  
  206. Please see the online documentation for a full treatment on
  207. progressive meshes.
  208.  
  209. (For more detailed technical information, see
  210. http://www.research.microsoft.com/research/graphics/hoppe/siggraph96pm/paper.html).
  211.  
  212. The "viewer" sample has been enhanced to load progressive meshes
  213. asynchronously.
  214.  
  215. Several progressive meshes have been provided on the SDK in
  216. \dxsdk\sdk\media.
  217.  
  218. A preliminary conversion tool has been provided in
  219. \dxsdk\sdk\bin\pmesh.  The convpm.bat batch file will convert a
  220. DirectX File containing a standard mesh to a DirectX File containing a
  221. Progressive Mesh.  Note that due to the amount of analysis that takes
  222. place, this tool can take *a long time* to run. bigship.x takes
  223. approximately 50 minutes to convert to a Progressive Mesh on a P166.
  224.  
  225.  
  226. Issues
  227. ------
  228.  
  229. Retained Mode's texture management does not correctly deal with mipmaps
  230. containing palettized textures.  Please use chains with RGB surfaces.
  231.