rapbbit

My code is: 9

Texture texture = new Texture(device, 256, 256, 0, Usage.None, Format.R5G6B5, Pool.SystemMemory);
Surface s = texture.GetSurfaceLevel(0);

Graphics g = s.GetGraphics()); //Exception here

no matther how i change the parameters in creat texture ,It always throw an invalid call exception any help



Re: Game Technologies: DirectX 101 Surface.GetGraphics() in WindowsMobile.DirectX.Direct3D always throw an exception 9

Wessam Bahnassi

Enable unmanaged debugging, and crank up the D3D debug level slider in the DirectX control panel. Then run your app under the debugger, you should see an error message from D3D9 saying why it is considering the call invalid.




Re: Game Technologies: DirectX 101 Surface.GetGraphics() in WindowsMobile.DirectX.Direct3D always throw an exception 9

The ZMan

This is in the mobile version os MDX - I'm not sure they have the same level of debugging as we have.

As I have posted in other mobile threads - there really is no know how on mobile DX in this forum and I have yet to find a place where there is expertise.






Re: Game Technologies: DirectX 101 Surface.GetGraphics() in WindowsMobile.DirectX.Direct3D always throw an exception 9

Wessam Bahnassi

Dope! Didn't notice the Mobile word in the post's title... Still, I believe they do output D3D error messages (IIRC I've read a post somewhere that tells how to get that output).