Sign in to follow this  

CreateImageSurface in Dx9

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

Hey guys I'm still figuring my way through this. I am following through a book (Sam's Teach Yourself Game Programming with Direct X), don't laugh. It was written for DirectX 8.1. I am using 9 so far things have been able to convert over with a few headaches here and there. But this one has me It calls for me to
g_hResult = g_pDirect3DDevice->CreateImageSurface(640, 480, D3DFMT_X8R8G8B8, &g_pBitmapSurface);
However, it refuses to compile and give me [C++ Error] File1.cpp(158): E2316 'CreateImageSurface' is not a member of 'IDirect3DDevice9' as an error. Is this method no longer in DX9? Or what am I doing wrong?

Share this post


Link to post
Share on other sites
CreateImageSurface Changes
IDirect3DDevice8::CreateImageSurface was renamed IDirect3DDevice9::CreateOffscreenPlainSurface. An additional parameter that takes a D3DPOOL type was added. D3DPOOL_SCRATCH will return a surface that has identical characteristics to a surface created by the former IDirect3DDevice8::CreateImageSurface. D3DPOOL_DEFAULT is the appropriate pool for use with IDirect3DDevice9::StretchRect and IDirect3DDevice9::ColorFill.


<3 MSDN reference

Share this post


Link to post
Share on other sites

This topic is 4135 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this