Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Do I need to learn C++ to use Open GL?

share|improve this question

3 Answers 3

up vote 29 down vote accepted

Not at all! Due to its simple C API, OpenGL has bindings available for Java, Python, Ruby, and just about any other language you can think of!

share|improve this answer

OpenGL is a C API. There are bindings for other languages but samples in books and tutorials tend to be written in C.

Because of this knowing C can help. You definitely don't have to learn C++ to use OpenGL though.

share|improve this answer

Not necessarily. In fact, OpenGL is native C. There is JOGL, which is a Java wrapper.
OpenGL ES, which is for the iPhone. I believe this is in Obj-C as well as C/C++. [Not sure, think so]
I think things like PyGame end up as OpenGL in the end, and they're done in Python.

But for raw OpenGL for the PC, the only choices I know of are C, C++, or Java.

share|improve this answer
3  
Obj-C is a strict superset of plain C. The OpenGL ES API is a pure C API, so the Obj- part of it is irrelevant. –  greyfade Jul 29 '10 at 15:50
    
Apologies for that. I took them to be different languages. –  The Communist Duck Jul 29 '10 at 19:17
1  
Pygame by default does not end up as OpenGL in the end; SDL's default rendering model is CPU-side framebuffers. You can use Pygame with OpenGL, but none of the core Pygame documentation covers how to do it. –  user744 Oct 14 '10 at 10:39
1  
Pyglet however is a Python library that has much of the functionality of Pygame but which does actually use OpenGL for rendering. –  Kylotan Oct 14 '10 at 15:57
1  
OpenGL-ES is not only for iPhone.. –  Gustavo Maciel Jan 6 '12 at 1:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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