中国民航大学学报 ›› 2013, Vol. 31 ›› Issue (4): 23-26.

• 民用航空 • 上一篇    下一篇

一种高效OpenGL 多线程文本绘制方法

吴仁彪,吴海宁,屈景怡,贾云飞   

  1. (中国民航大学智能信号与图像处理天津市重点实验室,天津300300)
  • 收稿日期:2012-11-09 修回日期:2012-12-17 出版日期:2013-08-25 发布日期:2013-10-08
  • 作者简介:吴仁彪(1966—),男,湖北武汉人,教授,博士,研究方向为自适应信号处理、高分辨率雷达成像与自动目标识别、民航无线电干扰检测与自适应抑制等.
  • 基金资助:

    国家科技支撑计划项目(2011BAH24B12);中央高校基本科研业务费专项(ZXH2012C004)

Efficient method for multi-thread text drawing based on OpenGL

WU Ren-biao,WU Hai-ning,QU Jing-yi,JIA Yun-fei   

  1. (Tianjin Key Laboratory for Advanced Signal Processing,CAUC,Tianjin 300300,China)
  • Received:2012-11-09 Revised:2012-12-17 Online:2013-08-25 Published:2013-10-08

摘要:

OpenGL库没有提供直接的文本显示和处理函数,文献[4]给出一种基于GDI的OpenGL文本绘制方法,但该方法效率低,CPU占用量大。考虑到Windows多线程机制,对上述方法做出改进,提出了一种基于多线程的OpenGL 文本绘制方法。该方法可有效利用多核处理器的优势,在对实时性要求较高或进行大批量文本数据绘制等方面有明显优势。实验结果表明,使用此方法能够有效提高文本绘制效率,改善用户体验。

关键词: OpenGL, GDI, 多线程, 文本绘制, 绘制效率

Abstract:

The OpenGL Library has not offer the function of text display and processing directly. Literature 4 provided a method of OpenGL drawing text based on GDI,but the efficiency was low and occupied too much of CPU time.Considering the feature of Windows multi-threading mechanism,some improvements are made,and a new method for text drawing in OpenGL based on multi-thread is proposed. This method can effectively utilize the advantages of multi-core processor,and add obvious advantages to high requirement of real-time or large quantities of text data drawing. Experimental results show that the application of this method can improve text drawing efficiency and improve user爷s experience.

Key words: OpenGL, GDI, multi-thread, text drawing, drawing efficiency

中图分类号: