經過很長時間(如一個月)後,我可以通過Direct3D11,Direct3D10,Direct2D和DirectWrite的互操作性在我的應用程序上呈現文本字體。現在我已經找到了解決方案,我注意到,在繪製一些文本時,FPS(每秒幀速率)大大減慢,有什麼建議?DirectWrite FPS SlowDown
編輯:
分析應用程序是把我很多時候是功能d2dRender-> DrawText的(...);其中d2dRender是ID2DRendertTarget指針
經過很長時間(如一個月)後,我可以通過Direct3D11,Direct3D10,Direct2D和DirectWrite的互操作性在我的應用程序上呈現文本字體。現在我已經找到了解決方案,我注意到,在繪製一些文本時,FPS(每秒幀速率)大大減慢,有什麼建議?DirectWrite FPS SlowDown
編輯:
分析應用程序是把我很多時候是功能d2dRender-> DrawText的(...);其中d2dRender是ID2DRendertTarget指針
我已經解決後,纔在它的修改和繪圖只呈現組織圖的文字,如:
if (myTextObject->IsChanged)
{
d2dRenderTarget->DrawText(...); // and what else we need to draw on the surface
}
// Draw my Texture here (surface)
另外,如果文本在兩幀之間不變,您還可以緩存IDWriteTextLayout對象(來自CreateTextLayout)並調用DrawTextLayout,以避免一些重新佈局成本。 –
性能分析 – Drop
我編輯的職位 – ThomasSquall