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

about directx

Started by kris3106 Mar 16, 2005 at 4:05 AM 6 replies 1.3k views
Original Post
kris3106
kris3106
i have a problem about direct. what reasons can let this function return a false result .. pPSur->GetAttachedSurface(∩︀,&pBBuf); thx...
Specchum
Specchum
Probably because the caps members haven't been filled up properly or because the surface has been lost. Check the docs for more detail.

What does your caps look like? And is pPSur valid?
"There is no dark side of the moon." - Pink Floyd
Cygon
Cygon
Some general advice:

It always helps to check what it is that this method returns. The DirectX SDK contains a helper library, consisting of dxerr9.h and dxerr9.lib, which can tell you the human readable name of the error that occured like this:

HRESULT hResult = pPSur->GetAttachedSurface(∩︀,&pBBuf);if(FAILED(hResult)) {  cerr << DXGetErrorString9(hResult) << endl;  throw std::runtime_error("GetAttachedSurface() failed"); // or whatever}


Also, try installing the debug runtime of DirectX. It will tell you, in plain english, in your output window, why the method fails and what you've got to do in order to fix it.
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
kris3106
kris3106
What does your caps look like? And is pPSur valid?
i can say si valid.
but thx all the same.

Thank you to help me .
let me try.
kris3106
kris3106
Dear Cygon:
Thank you helping me.
and i dont know how to install the debug runtime of DirectX.
i have intalled DirectX 9.0 SDK.

From kris3106
kris3106
kris3106
Dear Cygon:
Thank you helping me.
and i dont know how to install the debug runtime of DirectX.
i have intalled DirectX 9.0 SDK.

From kris3106
Codarki
Codarki
Control Panel -> DirectX -> Direct3D -> Use Debug Version of Direct3D
kris3106
kris3106
now i know the problem is "DDERR_NOTFOUND"
but i dont know how to "FOUND" it .
please give some adives ..
thx very much..
from kris3106 ..

Topic Locked

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

Sign in to reply to this topic.