Do I need to learn C++ to use Open GL?
3 Answers
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.
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.
-
3\$\begingroup\$ 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. \$\endgroup\$– greyfadeJul 29, 2010 at 15:50
-
\$\begingroup\$ Apologies for that. I took them to be different languages. \$\endgroup\$ Jul 29, 2010 at 19:17
-
1\$\begingroup\$ 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. \$\endgroup\$– user744Oct 14, 2010 at 10:39
-
1\$\begingroup\$ Pyglet however is a Python library that has much of the functionality of Pygame but which does actually use OpenGL for rendering. \$\endgroup\$– KylotanOct 14, 2010 at 15:57
-
1\$\begingroup\$ OpenGL-ES is not only for iPhone.. \$\endgroup\$ Jan 6, 2012 at 1:42