PDA

View Full Version : OpenGL uses C++ right?



mikau
07-20-2005, 09:45 PM
OpenGL uses C++ right? Sure looks like C++ to me. Unless its a very close relative.

mikau
07-20-2005, 10:00 PM
I'm thinking of getting OpenGL but I'm only really familiar with C++.

Come on I just need a yes or no answer! Speak up) :)

Ehsan Kamrani
07-20-2005, 10:01 PM
OpenGL architects have used from the C language to write the API. As this API doesn't use from the classes, they don't need to use from the C++ to make the OpenGL API.
If your question is *can i use from OpenGL with C++?* Your response is Yes. You can use the OpenGL with all the languages: delphi, C, C++, C#, etc.
-Ehsan-

mikau
07-20-2005, 10:09 PM
Either the "from" word is a technical definitition I'm unaware of or english is not your first language. (no offense)

:confused:

ce110ut
07-20-2005, 10:46 PM
opengl doesn't "use" C++, it is an application programming interface that was written in C. to put it mildly, opengl is a bunch of functions that you can call to do 2D/3D visualization. today, there are wrapper libraries for just about every language so that one is able to use opengl in a language other than C/C++.

hope that helps
:regards:

Ehsan Kamrani
07-20-2005, 10:52 PM
Originally posted by mikau:
Either the "from" word is a technical definitition I'm unaware of or english is not your first language. (no offense)

:confused: LOL.Yes. It's not my first language. My language is persian ;)
-Ehsan-

jide
07-21-2005, 12:58 AM
OpenGL implementations are written in many languages: C, Delphi, Fortran, Java and even MS VB !

In reality, I guess there's only one version (the C one) and other languages use those libraries to make their own version over the original ones. However I can't ensure it since I only use the default libraries written in C.

There's no real need for this libraries to be written in C++ as it uses all the C subset of C++ and is a bit object-oriented. You won't have classes and such (neither structures at all) but you will remain familiar, you'll see.

Jan
07-21-2005, 01:27 AM
Originally posted by mikau:
Either the "from" word is a technical definitition I'm unaware of or english is not your first language. (no offense)

:confused: Get used to it. At least 60%, if not more, of the people writing in this forum are not coming from a country were english is the native language.

To your question: OpenGL is just an API. It doesn't "use" any language. Although in the definition of OpenGL they used C exclusively, since it makes sense to use C for such an API (because of speed, etc.).

However, all you do in an OpenGL program, is to communicate with the graphics-card driver. The driver itself is most certainly written in C, but that doesn't mean anything, you can still use any other language to communicate with it. But all that has nothing to do with OpenGL. The Windows API is also written in C, but your Delphi/c#/whatever program can call Windows API functions, too.

If you want to learn OpenGL, i recommend
nehe.gamedev.net

Jan.

mikau
07-21-2005, 04:57 PM
Ok well I'm obviously not quite familiar with the technical terms and "use" is obviously not correct.

What I meant was, to program an OpenGL file I need to enter some source code right? What language is this source code in?

It sounds like the answer is C but is C++ code accepted?

I'm having trouble asking my question because I'm really not familiar with actually using programming. All I know is C++ itself and the syntax of the language. What compiles, and what produces an error.

The differant parts of programs that act on the programs you write, and all that, I'm not really familiar with as far as terminology.

07-21-2005, 05:13 PM
http://www.opengl.org/resources/faq/getting_started.html

mikau
07-21-2005, 05:22 PM
Thanks. lol. Should have read the FAQ's.