Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Learning some GLUT, I implemented my own set of geometric objects, each on its own procedure, doing glPushMatrix() and glPopMatrix() in between. This allows for reuse on other demos.

Yesterday, I heard about VBOs, and now I want to use them in my geometric objects library. How should I refactor my code, in order to choose between VBOs and immediate mode in my library?

share|improve this question
2  
I think many people will wonder why you would want to have immediate mode at all. Do you have strong reasons to keep it? – Sam Hocevar Apr 25 '12 at 16:18
Just pedagogical reasons. All I've done so far are demos, and it made sense to have the ability to turn on/off this feature. However, if this does not make any sense at all, feel free to say it. – Oak- Apr 25 '12 at 16:22
1  
It does not make sense. Modern GL has deprecated and removed immediate mode, and GL|ES never supported it. There are no advantages to supporting immediate mode and lots of reasons to avoid it. – Sean Middleditch Apr 25 '12 at 17:53
1  
Your question cannot be answered without knowing what your code currently looks like. You can't refactor code you've never seen. – Nicol Bolas Apr 25 '12 at 21:41

closed as not a real question by Nicol Bolas, Byte56, Jonathan Hobbs, Trevor Powell, Yannbane Sep 29 '12 at 14:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

I would kindly suggest you to separate the code completely. If you still want to use immediate mode, it's fine for you, but beware of no further support and the code may break any time even if you create OpenGL app with backward-compat mode.

share|improve this answer
-1: None of what you have said is true. NVIDIA fully supports compatibility, and Mark Kilgard has gone on record as saying that the core/compatibility deprecation/removal stuff in GL was a mistake that never should have happened. AMD hasn't said anything one way or another, but there is no indication that they're abandoning compatibility contexts either. The only OpenGL vendor that doesn't support compatibility is Apple, and they only support GL 3.2 core. – Nicol Bolas Apr 25 '12 at 21:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.