`Exception thrown: 'SharpDX.SharpDXException' in SharpDX.ni.DLL
CCStats: Failed to create stats texture:
SharpDX.SharpDXException: HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.
at SharpDX.Result.CheckError()
at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut)
at SharpDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description)
at Microsoft.Xna.Framework.Graphics.Texture2D.CreateTexture()
at Microsoft.Xna.Framework.Graphics.Texture.GetTexture()
at Microsoft.Xna.Framework.Graphics.Texture2D.PlatformConstruct(Int32 width, Int32 height, Boolean mipmap, SurfaceFormat format, SurfaceType type, Boolean shared)
at Microsoft.Xna.Framework.Graphics.Texture2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipmap, SurfaceFormat format, SurfaceType type, Boolean shared, Int32 arraySize)
at Microsoft.Xna.Framework.Graphics.RenderTarget2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, Int32 preferredMultiSampleCount, RenderTargetUsage usage, Boolean shared, Int32 arraySize)
at Microsoft.Xna.Framework.Graphics.RenderTarget2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, Int32 preferredMultiSampleCount, RenderTargetUsage usage, Boolean shared)
at Microsoft.Xna.Framework.Graphics.RenderTarget2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Boolean mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, Int32 preferredMultiSampleCount, RenderTargetUsage usage)
at CocosSharp.CCTexture2D.ConvertSurfaceFormat(Texture2D texture, SurfaceFormat format)
at CocosSharp.CCTexture2D.InitWithTexture(Texture2D texture, CCSurfaceFormat format, Boolean premultipliedAlpha, Boolean managedIn)
at CocosSharp.CCTexture2D.InitWithData(Byte[] data, CCSurfaceFormat pixelFormat, Boolean mipMap)
at CocosSharp.CCTexture2D..ctor(Byte[] data, CCSurfaceFormat pixelFormat, Boolean mipMap)
at CocosSharp.CCTextureCache.AddImage(Byte[] data, String assetName, CCSurfaceFormat format)
at CocosSharp.CCStats.Initialize()`
Posts
@kjpou1 I was able to make it work during flight today. Made a pull request here: https://github.com/mono/CocosSharp/pull/261
Interested in your feedback, thanks.
Will take a look at it.
Thank you!
btw, thank you for updating stats @kjpou1 @RamiTabbara
Actually big thanks to @Vaclav for his time and donation.