Skip to main content
GameDev.net gamedev.net
🔒 Locked

Client Memory Surfaces

Started by arm Sep 9, 2003 at 5:30 PM 3 replies 250+ views
Original Post
arm
arm
Hi all, I have a problem with some code that creates a Client Memory Surface. The code does indeed create a Direct Draw Surface based on the pixel data I give it but seems to copy the data into into another system memory buffer instead of using the buffer i passed to IDirectDrawSurface::CreateSurface. Is this standard behavior or is it possible to have direct draw use the original buffer??? Cheers, arm [edited by - arm on September 9, 2003 7:24:57 PM]
arm
arm
It should be left in system memory since the DDSCAPS_SYSTEMMEMORY flag was specified.

[edited by - arm on September 9, 2003 7:23:56 PM]
don
don
If you call GetSurfaceDesc on the resulting surface, does it contain the address of your client memory buffer?

This surface you''re doing this with isn''t the primary or any of the surfaces in the flipping chain, is it?
arm
arm
No, the lpSurface member points to a new area of RAM and not to the pixel data I specified.

Also, the surface is just a plain offscreen surface and not part of the primary surface or its flipping chain.

[edited by - arm on September 10, 2003 4:22:57 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.