For more information, see the Remarks section on the DdCreateSurface reference page. To have the DirectDraw runtime allocate user-mode memory, the driver should return the DDHAL_PLEASEALLOC_USERMEM value from its DdCreateSurface function. If the driver allocates the memory directly, a subsequent request to change the video mode by a process other than the one that created the surface, could cause an operating system crash or memory leaks. Instead, the driver can have the DirectDraw runtime allocate user-mode memory for a surface. Note A DirectDraw driver must never directly allocate user-mode memory for a surface (for example, by calling the EngAllocUserMem function). For more information about D3dCreateSurfaceEx, see the DirectX Driver Development Kit (DDK) documentation. The driver also creates its own copy of the surface structure maintained by DirectDraw at this time. This function associates a handle with the surface in question for later use in the DirectX D3dDrawPrimitives2 token stream. This process is covered in more detail in the following sections.ĭ3dCreateSurfaceEx. The DirectDraw runtime allocates memory for any surface that is not allocated by the driver in response to the DdCreateSurface call. Thus, the driver may be required to create many surfaces in one call. Complex surfaces can be created all at once, with one call to DdCreateSurface. The driver creates the surface, potentially allocating memory for the contents of the surface. ![]() ![]() The driver can return a failure code that is propagated to the application.ĭdCreateSurface. The runtime calls the driver's DdCanCreateSurface to see if the driver allows the creation of a surface of this type, size, and format. Direct Draw surfaces are created in a four-stage process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |