Jump to content
  • Advertisement
Sign in to follow this  
Ebola0001

CreateImageSurface in Dx9

This topic is 4354 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
Advertisement
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
Sign in to follow this  

  • 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!