如何使用 OpenGL、SDL 和 C++ 绘制文本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52431/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I draw text using OpenGL, SDL and C++?
提问by Haim Bender
回答by RJFalconer
I came across this great guideon linking in SDL extensions for those new to SDL, which you may find useful.
我遇到了这个关于 SDL 扩展链接的很棒的指南,您可能会发现它很有用。
That said, when I had your problem, I eventually went with FTGLas the way SDL-ttf produces an SDL-Surface with its font rendered on itovercomplicated matters in my situation. This may not be the case in your situation though
也就是说,当我遇到你的问题时,我最终选择了FTGL,因为SDL-ttf 生成 SDL-Surface 的方式,其上呈现的字体在我的情况下过于复杂。不过,您的情况可能并非如此