Original Post
I'm having trouble using the Texture.LoadBitmap(...) method. Whenever I call it, it raises an exception: Error in the application. -2146232832 (Unknown) at Microsoft.DirectX.Direct3D.Texture.CreateTextureFromBitmap(Device device, Bitmap image, Usage usage, Pool pool) at Microsoft.DirectX.Direct3D.Texture..ctor(Device device, Bitmap image, Usage usage, Pool pool) at Microsoft.DirectX.Direct3D.Texture.FromBitmap(Device device, Bitmap image, Usage usage, Pool pool) ... etc I looked the exception up with the Error Lookup tool, but it can't find anything. I searched for the error code on these forums, and in those cases it seems related to using the wrong VertexFormat, but that doesn't seem to apply here. I can load the texture using: TextureLoader.FromFile( engine.Device, image, size.Width, size.Height, 1, Usage.RenderTarget, Format.Unknown, Pool.Default, Filter.None, Filter.None, engine.Transparent.ToArgb()); But when I use: Texture.FromBitmap( engine.Device, new Bitmap(image), Usage.RenderTarget, Pool.Default); I get the error. Both are using the same Device, the same image file, the same Usage and Pool, but FromBitmap fails, and FromFile doesn't.