提高DirectWrite中渲染文本的性能。 [英] Improving performance of rendering text in DirectWrite.

查看:109
本文介绍了提高DirectWrite中渲染文本的性能。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我在DirectWrite中渲染文本时遇到问题。我知道,每帧使用drawtext和drawtextlayout确实会减慢游戏速度,但我希望创建文本的几何体,我可以存储和刷新文本,当我的文本发生变化时。以前我使用FW1FontWrapper
librabry,但它不支持Windows Phone,所以我必须更改它。我尝试将rendertarget保存到位图然后绘制它,但它是如此缓慢,对于~400行文本,fps反复下降。所以也许有人帮助我,我的文字怎么办?

解决方案

检查本文档中的建议:  https://msdn.microsoft.com/en-us/library/windows/桌面/ dd372260(v = vs.85)的.aspx#文本

Hello,

I have a problem with rendering text in DirectWrite. I know, that using drawtext and drawtextlayout per frame really slows the game, but I want to create geometry of the text, that I can store and refresh, when my text change. Previously I use a FW1FontWrapper librabry, but it doesn't support Windows Phone, so I must change it. I try to save rendertarget to bitmap and later draw it, but it is so slow and for ~400 line of text, fps counter down quicly. So maybe anybody help me, what can I do with my text?

解决方案

Check suggestions in this document: https://msdn.microsoft.com/en-us/library/windows/desktop/dd372260(v=vs.85).aspx#text


这篇关于提高DirectWrite中渲染文本的性能。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆