开发者

2d graphics optimization tips

do u know any techniques allowing to speed up 2d primitives such as lines and circles?

i develop application that allow to edit images containing such primitives. they can be moved and selected in the same way as windows desktop icons are (including group selection by rectangle). also objects that cursor is on are highlighted.

it seems that there are many display updated involved when mouse is used. so i need to do it smartly.

i know that:

  1. changing GDI+ to D3D can speed up display greately
  2. dirty rects allow to res开发者_如何学Pythontrict updates to only those rectangles that changed. (major drawback is that rectangles containing lines can be as big as display area)
  3. xor technique allow to clear primitive by drawing it second time. (drawback is that it seems to be useless with multicolor images and primitives with common points)

thanks for useful tips & links.


Take a look at Michael Abrash's Graphics Programming Black Book

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜