PDA

View Full Version : Best OpenGL Wrappers



Gadget
04-01-2004, 08:04 PM
I am thinking of rewritting my GFX engine for my MMORPG using OpenGL. What wrappers can you recommend? I need something that is powerfull, stable and easy to use.

Also, Can I still use DirectX to draw my interface overlay, or is it more recommened to use OpenGL to draw it?

WILL
05-01-2004, 03:40 AM
I'd recommend going OpenGL all the way. You can then make you're game cross-platform(allowing for deticated servers on linux) and I think it would make the program run slower if it could be done that way at all.

As for the wrappers? Does the JEDI project not have a set?

Alimonster
05-01-2004, 10:12 AM
You don't really need to be mixing-and-matching something like OpenGL + DirectDraw. Use one or the other (or maybe Direct3d). If you're using OpenGL then you can draw 2d stuff (for overlays, your HUD, etc.) with an Ortho projection matrix (glOrtho or gluOrtho2d, which both do much the same). Orthographic projections basically mean that the z value doesn't change the polygon's size on the screen (i.e., the z acts as a "z-order" in 2d windowing terms, for placing objects in front of one another). This will let you draw your objects easily enough.

There's an equivalent for Direct3d, although I may be a little off here since I don't use it. You can set "rhw" in the FVF (flexible vertex format), which basically means, "don't transform this vertex". In other words, when a vertex is supplied in XYZRHW format, it will be in screen coordinates.

In terms of OpenGL wrappers, you have DOT (http://www.delphi3d.net/dot) (Delphi OpenGL Toolkit) by Tom over at http://www.delphi3d.net. You can also use GLXtreem (see the forums here), which may well be easier to get help on (since Andreas is posting regularly, but Tom is a busy guy). GLXtreem is a higher level wrapping up of 3d concepts (giving you things like heightmaps, bsps, and so on), if I remember right, while DOT is more focussed on just wrapping up OpenGL neatly. So, if you go for DOT, you may have to do some of the higher level concepts yourself.

You can also do it in straight OpenGL if you want, by getting the DOT files but only using gl.pas, glu.pas, glext.pas and/or glut.pas (but probably not the last one).