Strange Texture object constructor exception in Managed DirectX

Hello!

I have recently started programming DirectX, and I have chosen to used Managed DirectX 2.0 to create my application. Everything went all right until I tried to create a texture object to draw as a sprite.
I had a Bitmap loaded from a 32bit PNG, and when the execution flow encounters the statement
Texture deviceTexture = new Texture(DxDevice,
bmp , Usage.None, Pool.Default);
an InvalidCallException with "Error in the application." message is thrown.
I don't know what is the error and how to fix it. Does anyone has any idea about this

Thanks in advance,



Answer this question

Strange Texture object constructor exception in Managed DirectX

  • MattPM

    MDX 2.0 is still in beta. You should ask question about this in the beta newsgroups. See http://msdn.com/directx/beta for more information.

    Standard tips if you get an InvalidCallException for all MDX versions:

    - Enable the Direct3D debug runtime (in the DirectX control panel app or in VisualStudio)

    - Enable unmanaged debugging (in the project settings)

    - Look at the message in the output Windows after the exception was throw.



  • Strange Texture object constructor exception in Managed DirectX