Why is GLUT so bad?

蹲街弑〆低调 提交于 2019-12-06 01:06:14

问题


I've seen a lot of bad comments about GLUT, although openFrameworks uses it.

Cinder developers have stated that they want to stay as far away from GLUT as possible...

So what's so bad about it?


回答1:


You should never use the actual GLUT. It hasn't been updated since 2001 or so. FreeGLUT on the other hand is just fine; it is 100% backwards compatible with the original and is still in semi-active development. You may assume that any further references in this answer to "GLUT" to mean "FreeGLUT".

Why the Cinder developers don't use it is obvious: because they're rewriting what it does. They're writing an alternative to GLUT.

GLUT is designed around getting an application up and running. It's designed to make it easy and obvious where to put your code in order to make everything work. That's what it is ultimately for: to make it easy for you to throw stuff onto the screen.

But throwing stuff on the screen is generally not what actual applications want to do. It's part of what they do, certainly. But they do much more than that. And the GLUT way of doing things often works counter to what someone writing a serious application wants to do.

It's all about using the right tool for the right job. GLUT is great for putting together a simple, self-contained visual effect. It's great if you want some basic input (mouse movements, key presses). But if you have strict timing needs, or many of the other things that a real application needs to do, then GLUT is going to be more of a hindrance than a help.

There is no reason why you can't have GLUT in your pocket for simple tests of effects and so forth, and then later bring out something like Cinder or whatever for something that has other needs.



来源:https://stackoverflow.com/questions/7936731/why-is-glut-so-bad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!