Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / Game Design & Programming / Convertion between Direct3D and OpenGL Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

November 18, 2004, 01:58 PM

Hi guys

As part of a senior project I will make a 3D game engine. I'm familiar with computer graphics theory and I know the fundamentals of OpenGL (I'm also a C++ decent programmer).

I intend to make my engine so that I can use either Direct3D or OpenGL for the rendering (the programmer or the user can select that at runtime, or something like that). I'll make some classes or libraries that will be responsible for the rendering using the selected API so that I don't have the functions calls to Direct3D or OpenGL all over the place.

My question is the following: what API should I use for my first implementation? Or in other words, what is easier, to convert code using OpenGL to Direct3D or viceversa? I heard from a friend that writing something in OpenGL and then porting it to DirectX was easier than the other way around. I would like to hear what you guys think.

Note that what I'm asking has nothing to do with the Direct3D vs OpenGL flame war(which one is better, faster, easier, smellier or meaner). From what I've heard and seen they're both awesome(just consider Unreal Engine 3 and Halo 2 for DirectX and the Doom III and Half-Life 2 engines for OpenGL). I'd appreciate if the answers I get are as unbiased and practical as possible.


November 18, 2004, 02:22 PM

I programed in OpenGl first and then DirectX

OpenGl is easier and you get result fast
If you start it's perfect

But if your game is serious you got to go with DX
Opengl don't connect the Game Controller like DirectInput do
Opengl don't do sound Like DirectSound do
Opengl don't do Network play like DirectPlay does
Opengl don't give you tool for Mesh Skinning...(animation)

Frankly OpenGl is the poor man tool for game design :-)
Good for starter and to test your skill

DirectX is more complex to learn and it's better if you know MFC
so you can do the Editor Level better
(Frankly it's hell to program at first but it's worth it)

Another thing DX think in Vertex Buffer
Everything is Vertex Buffer, Index Buffer and Triangles

So if you have to start with Opengl Start by using the VertexBuffer
function for every thing you draw in OpenGL

The result will be easier to convert to DirectX Later

This thread contains 2 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.