I would like to construct a Texture object from a Bitmap object. I used
the following statement:
Texture torusTexture = new Texture(dev, torusBitmap, 0, Pool.Default);
This line always causes the following error message:
An unhandled exception of type
'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in
Additional information: Error in the application.
I have played with many variations with regards to the third and forth
for the Texture constructor, but without luck. My bitmap is of the size
of the pixel format PixelFormat.Format32bppPArgb.
The device object seems to be initialized properly as I can construct
a Texture object from a bitmap file (using TextureLoader class).
Does anyone has an example to construct a texture object from existing
Thanks in advance,
James X. Li