Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The DDGPE AllocSurfaceroutines are extensions to its counterpart, the GPE AllocSurfacefunction. With the addition of the pixelFormat parameter or the pddgpeAllocSurfaceData, your driver can allocate many different types of surfaces, instead of being restricted to the limited number of GPEsurface types.
Your driver should override the first DDGPE AllocSurfacefunction below to perform the necessary allocation. Otherwise, the function merely wraps to the standard GPE AllocSurface, that you must define in your driver. In this case, the pixelFormat information is ignored. The default implementation of the second DDGPE AllocSurfaceroutine below just calls the first one, ignoring the information you might have in DDGPEStandardHeader. Your driver needs to override it in case you want to take advantage of DDGPEStandardHeader.
// Surface memory allocation virtual SCODE AllocSurface ( DDGPESurf ** ppSurf , int width , int height , EGPEFormat format , EDDGPEPixelFormat pixelFormat , int surfaceFlags ); virtual SCODE AllocSurface ( DDGPESurf ** ppSurf , DDGPEAllocSurfaceData * pddgpeAllocSurfaceData );
Parameters
GPE_REQUIRE_VIDEO_MEMORY: Surface memory must be allocated in video memory.
GPE_PREFER_VIDEO_MEMORY: Surface memory should be allocated in video memory if possible, but can be allocated in system memory, if necessary.
If no flags are set (i.e. surfaceFlags is set to zero (0)), the surface will be allocated in system memory.
Return Values
The return value is S_OK if the function is successful. Otherwise an error code is returned.
Last updated on Tuesday, July 13, 2004