OpenGL - what's the point?

Ceroc Addict

Registered
I have a vague interest in teaching myself some OpenGL (I can already program in Java, C, C++, Python, etc).

What's the point of OpenGL? Is it only really for games programmers?

More to my real point, when programming for other Mac users, what would be most useful/interesting for a programmer (working alone) to know?


  • AppleScript (seems to be of decreasing importance, given Automator)
  • JavaScript (seems to be of increasing importance, given Dashboard)
  • OpenGL (??? importance)
  • Other?
Kap
 
Video cards use OpenGL for rendering. It is how you get your program to "talk" to the GPU. It is designed for mutilating pixels etc... If you are going to be doing any type of graphical movement that requires performance, even 2D stuff OpenGL is for you.

Yes it is more common in games. Standard applications without any fancy visual effects would not require OpenGL.
 
You don't really need OpenGL to be able to "talk" to the GPU. That's the task of drivers. OpenGL is actually just making it easier for programmers to use certain effects and to ensure compatibility. That's why it is called api (application programming interface). So, is it only for games? Currently it is mostly used in games, but many other applications use this api as well. Who knows? Maybe soon we'll see a 3d finder which will use this interface as well?!
 
Ceroc Addict said:
So, if I just teach myself Objective-C can I just make calls to some kind of OpenGL library/API?

Kap

OpenGL is accessible from Objective-C, C and C++, RealBasic (I think) and probably some others.

Wade
 
You need to have a Java OpenGL API like JGL or JOGL to use it with Java. Viro, do you need to have different API's for all other languages or is Java just difficult because it runs on a virtual machine? I've never done any OpenGL work with anything but Java.
 
OpenGL is implemented in C. The spec is in C, the code is in C. In Java you need to go through loops and hoops to get C code (i.e. native code) to work. That's why you have JOGL and LWJGL to wrap the C function calls in Java methods.

Languages like Objective-C and C++ don't have this problem since you can just call the functions directly. On OS X, all the necessary libraries come with the system so you don't need anything extra.

Don't know about REALBasic.
 
Back
Top