Jump to content
  • Advertisement


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


CreateImageSurface function!?!?!?!

This topic is 5465 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

are exactly what you expect.

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.


Share this post

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


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,

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!