I wanted to know how badly my games will be affected by using glBegin
and whatnot instead of GLSL and VBOs and VAOs and all that. They just look so difficult and ridiculous to achieve what I can do easier. What will the effect of my choices be?
Asked
Active
Viewed 1.7k times
16

genpfault
- 51,148
- 11
- 85
- 139

Nathan Wride
- 965
- 1
- 7
- 28
-
6I’ve edited your question a little bit. For future reference, Stack Overflow is pretty strict—it helps to avoid anything in your question that isn’t directly on-topic, such as swearing or even “thank you”. That strictness might seem oppressive, but it does help encourage more useful questions and answers, so everyone ultimately benefits. – Jon Purdy Jan 13 '13 at 04:23
-
3As both games and OpenGL matures, it tends to be less a tool for game developers and more a tool for game engine writers, what in turn are to be used by game developers. Games complexity are going up, while OpenGL abstractions are going down, so if What you want is to make games, maybe you should look into a higher level tool, like [Ogre](http://www.ogre3d.org/). – lvella Jan 13 '13 at 04:29
1 Answers
38
Badly.
The direct mode API with glBegin()
and glEnd()
is deprecated, largely for performance reasons. It doesn’t really support data parallelism, and relies heavily on the CPU—requiring at least one function call per vertex. That adds up quickly.
The direct mode API might be simpler and more pleasant for you to use in small projects, but using VBOs scales better, both in terms of performance and maintainability. It’s much easier to manage data than it is to manage state.
Also, learning the new API means you’re up to date on how OpenGL is and should be used in the real world. If you’re looking to work in the games industry, for example, that’s just plain useful knowledge.
Some useful learning materials:
-
I guess I'll have to forget what I know and relearn everything then right? – Nathan Wride Jan 13 '13 at 04:26
-
4@NathanWride: Don’t worry. It’s not really that big of a step. Check out the links I’ve added. – Jon Purdy Jan 13 '13 at 04:39