开发者

An exception when creating CompatibleRenderTarget from DcRenderTarget

I’m using the .Net Direct2D API in “Window开发者_JS百科s 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,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜