Working in DirectX and OpenGL

So, the question is if one can develop in DirectX and OpenGL at the same time. It isn't always easy to work with both but it can be done and offers significant benefits.

One challenge I've had in this area is when using the Java3D library. While the Java part is portable it relies upon a graphics subsystem that is platform specific - e.g. you have to install the OpenGL library on Solaris versus the DirectX based library on Win32. This isn't so much a development challenge (the API is the same either way) but a deployment issue (getting the right platform specific library installed). Also both the DirectX and OpenGL libraries for Java3D are using the Java Native Interface (JNI) to make this magic happen. Most of that is hidden from the Java3D programmer but the consequences of using JNI (e.g. memory management, performance, etc.) remain.

As far as working on Win32, using Visual C++, etc. I've not only had both on the same machine but used both in the same application. There is a decent LaMott (sp? - those green books on game programming) book on OpenGL game programming that points out that OpenGL really just the graphics part while DirectX has support for input (mouse, gamepad, etc.), sound, network play (being abandoned in favor of .Net), etc.....and so the examples in that book mix OpenGL and DirectX in the same demo.

Here are some lists of links I've compiled that might be of interest see and This include links to books and reference sites I recommend.

No comments: