1

I’m using the .Net Direct2D API in “Windows API Code Pack for .NET” to improve the drawing performance, it always throws the “Exception from HRESULT: 0x88982F80” when creating the CompatibleRenderTarget from DcRenderTarget, I don’t know why, it has been troubled me for two days. And here is my code:

var renderTarget = dcRenderTarget.CreateCompatibleRenderTarget(CompatibleRenderTargetOptions.None, new PixelFormat(Format.R8G8B8A8UNorm, AlphaMode.Straight), new size);

It works fine if I change the “AlphaMode” to others, such as “Ignore”, but it’s unable to make the renderTarget transparent, or gives a bad drawing quality.

Hope anybody knows the reason or please be free to post your ideas.

Regards!

Thanks,

Howard
  • 3,638
  • 4
  • 32
  • 39
  • The error code means WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, according to http://social.msdn.microsoft.com/Forums/eu/windowssdk/thread/416004c5-6b73-45cd-a820-92b6608e9bfd. I'm not posting this as an answer because I couldn't solve this yet. Did you? – Léo Apr 04 '12 at 13:42

0 Answers0