This sample shows us how to draw some text on the screen with OpenGL. If you just want to display some characters or digital numbers, you could go with the OpenGL built in display list or even with a simple texture. But if you want to display more complicated font, you need to draw such text into some immediate font buffer (like a bit map), then copy the content from the buffer to the OpenGL frame buffer. That is how to display Chinese with OpenGL.
The full source code could be found from here.
本文介绍如何使用OpenGL在屏幕上绘制复杂的中文字体。如果只是显示简单的字符或数字,可以使用OpenGL内置的显示列表或简单纹理。但要显示复杂字体,如中文,需要先将文本绘制到即时字体缓冲区(如位图),然后将缓冲区的内容复制到OpenGL帧缓冲区。
12万+

被折叠的 条评论
为什么被折叠?



