directx or opengl

Started by
21 comments, last by Oluseyi 19 years, 6 months ago
which one would your recommend?! I am new to c++ win32 apps and cant find any docs to explain it so i can decide so i thought id ask.
Advertisement
I'd suggest DirectX, simply because that's what I use.

Better yet, flip a coin. I'd be easier to decide that way. They're really basically the same until you get into the more advanced stuff later on...

EDIT: even better, since you're new to C++, you should probably study up on something a little easier like GUI or Allegro or something like that until you've gotten the basics of the language down pat.
Here's the simple answer. Ask yourself the following questions:

Will I be porting the game to other systems?
Yes: OpenGL
No: DirectX

Will I be porting to XBOX only?
Yes: DirectX
No: Whatever you got above.

Do I want to have the sound and input integrated with the same system?
Yes: DirectX
No: OpenGL

There you go, that's what you should be asking yourself. The answer should be pretty obvious, and you can read plenty threads like this one, and they'll all say pretty much what I just said. Just in more words.
She walked into my office like a centipede with 98 missing legs.
I would suggest SDL now, and then OpenGL later, but that is just my opinion.
look at code for both and see what you prefer.
However, you should only really compare OpenGL to D3D, the rest of DirectX can be used with OpenGL anyways
Cross Platform Options:
LEARNING - OpenGL (graphics), GLUT (input and basic windowing), OpenAL (sound), (and maybe MUSCLE for networking)
GENERAL - OpenGL (graphics), SDL (input / windowing / networking), OpenAL (sound)

Windows Only Options:
OpenGL or Direct3D 9 for basic graphics.
OpenGL or Direct3D based higher level library / engine for any real graphics (such as TORQUE).
DirectMusic or OpenAL (plus higher level lib) or SDL [or other libs] for sound.
DirectInput (plus WinAPI) or SDL or GLUT [or other libs] for input.
DirectPlay or SDL [or other libs] for networking.

I personally did 2D graphics in DirectDraw 6 a few years ago, that was fine. I currently do standard GUI work solely in .NET based GDI+. I also do 2D and 3D stuff in OpenGL now. I used to use DirectSound, then switched to DirectMusic and OpenAL for all current sound lib stuff. I don't currently have any working game style networking in my projects so no help there. My input system varies from Pure Win32 API, GLUT, DirectInput, SDL, and .NET API - all of which serve some purpose fairly well.

good luck.
This is the most asked question...

I tried OpenGL and DX, finally I choosed DX because it was more my programming style. But that was my decision.

I will keep using DX for Windows, but I'm starting with OpenGLES for cellphones. I really doubt the future of Direct3Dm for mobile... but prefer it for PC.

I guess that after you get the idea about how 3D works, everything is the same. Anyway, read some sample code on DX and OpenGL and see which one you like.

Luck!
Guimo



OpenGL's a bit easier. :)
---PS3dev
I would say learn both. I'd start with DirectX first. It can be difficult at first, but once you understand what's going on, you should be alright. Once you get to a point where you want to port or have finished DirectX then learn OpenGL too.
*loads napalm*

Start with DirectX and use it until you realise OpenGL is better.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement