is OpenGL outdated?

I would like to get into 3D eventually, but I was wondering if OpenGL was still the “current best thing” or if it was getting replaced by something else. The red book would of course be the first book I buy, but is there another 3D interface that’s better? Also, I’m talking about 3D graphics for applications, NOT applets (if that matters).

Also, all the OpenGL code I see is C++ based. (i.e., #include statements and whatnot). How would I use OpenGL in Java? (or can I even do that?)

OpenGL isn’t outdated, however a version 2.0 is being worked on - no timeframe though.

The “Other” 3D api is Direct X. Selection of either depends on your platform, and your target platform.
DirectX = Window
OpenGL = All others

As for the redbook, you can download it here (though a hardcopy would be nice):
http://www.gamedev.net/download/redbook.pdf

So DirectX only works with Windows, but OpenGL works with everything (including Windows, I hope)? I’ve heard OpenGL is much easier than DirectX. Agree?

…And because the dear Matzon forgot to mention it, you can do OpenGL with java. Try lwjgl at sourceforge, that includes OpenGL, OpenAL, input and vector libraries:

http://java-game-lib.sf.net

It isn’t possible with standard/pure java though.

EDIT: yup, opengl is available on everything (almost), including windoze itself.

OpenGL is somewhat easier than DirectX. In terms of sheer typing alone, OpenGL requires about half the amount of code to achieve the same result. Much of this comes from having somewhat shorter constant names and hiding some of the nastiness in the driver.

Cas :slight_smile:

Syntactically I prefer OpenGL over Direct3D any day - if you’re a Windows programmer you may be able to read things like “hRes=lpddClipper->lpVtbl->SetHWnd(lpddClipper,0,hwnd)” or “hRes=lpddPrimary->lpVtbl->Blt(lpddPrimary,&rDstRect,lpddDevice,&rSrcRect,DDBLT_WAIT,NULL)”, but it just makes my head hurt. :wink:

It’s reasonably fair to say that OpenGL had beun to fall behind Direct3D in terms of features and usability, but the aforementioned version 2.0 of OpenGL is set to bring OpenGL right to the forefront yet again.

There are a number of OpenGL bindings for Java, the popular one around here being LWJGL. In fact, the responses you’ve had so far have been from LWJGL developers, but they forgot to mention that… ;D

Yes, OpenGL works on Windows - very fast in fact. It’s no big secret that Quake 2 and 3 and the new Doom3 are all written primarily in OpenGL. With games like that using it, you can bet that commercial graphics card drivers are very well optimised for OpenGL.

Interesting question about whether it’s going to be replaced by the “next big thing”… does anyone know of any 3D interfaces in general use apart from OpenGL and Direct3D? Are we really in a two-horse race here? ???

I’d say less “2 horse race” and more “one generally accepted standard and Direct3D”.

Some of the lesser players are:

Glide
RenderGL
3DR
Heidi

BTW. Java3D also offers a scenegraph API on top of OpenGL.

Glide - is somewhat dead now :]
Heidi - lol :smiley:

Well, I think they still use Glide3D in many Linux gaming projects. At least I had to install it to be able to play several games made for Linux.

As for Heidi, well I dont even know what it is…I just found it mentioned somewhere on the net. I think it was made by autodesk.

[quote]…And because the dear Matzon forgot to mention it, you can do OpenGL with java. Try lwjgl at sourceforge
[/quote]
Although, of course, lwjgl is Windoze-only ATM.

Erh no. It works fine on linux. And hopefully macosx soon.

  • elias

Imagine our surprise when Alien Flux ran on Elias’ linux box. It was quite a shock to me, anyway.

Cas :slight_smile: