Archived

This topic is now archived and is closed to further replies.

CreateImageSurface function!?!?!?!

This topic is 5128 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok, there is a function CreateImageSurface(arg) and well, im using dx9 so i dont seem to have that function available to me, i have found a similar function i think it was createoffscreensruface but it had a completely different prototype than what i was expecting, is there any equivalent of the CreateImageSurface() function in dx9?

Share this post


Link to post
Share on other sites
IDirect3DDevice9::CreateOffscreenPlainSurface isn''t very difficult to use IMO.

UINT Width
UINT Height and
D3DFORMAT Format

are exactly what you expect.

DWORD Pool
See sdk docs on resource pooling; this will vary depending on where you plan to use the resource (sysmem or vidmem, essentially)

IDirect3DSurface9** ppSurface
Pointer to a pointer of your surface interface variable.

HANDLE* pSharedHandle
Should be set on 0. I expect this was reserved for some sort of multi-thread or multi-device system, but it''s not used as of now.

-Nik

Share this post


Link to post
Share on other sites
Quote from the SDK, copied for educational purposes:

quote:

CreateImageSurface Changes


CreateImageSurface was renamed IDirect3DDevice9::CreateOffscreenPlainSurface. An additional parameter, D3DPOOL, was added. D3DPOOL_SCRATCH will return a surface that has identical characteristics to a surface created by the former CreateImageSurface. D3DPOOL_DEFAULT is the appropriate pool for use with IDirect3DDevice9::StretchRect and IDirect3DDevice9::ColorFill.



So yes, i think you should use that

kind rgds,
Nik

Share this post


Link to post
Share on other sites