OpenGL or DirectX?
For a programmer who has rather extensive knowledge in C/C++, the Windows application programming architecture (including MFC and the regular C-style), and 2-dimensional game programming in Java through games such as Breakout, Pong, Pacman, etc., what would be the prime API of choice, OpenGL or DirectX, to begin programming side-scroller, isometric, eventually 3d games, etc., and possibly find a career in this business. I have found there to be strong support for both, and can not come to terms with which to choose. I would find the advice of the "true" community of gamers/programmers here on GameDev.net helpful in making my final decision for which one to start with. I plan to learn the other when I finish acquiring the knowledge of the first.
Thank you for your help!
Viscous-Flow ~ A 14-year old (soon to be 15) who already has taken several advanced college courses and is currently looking for job oppurtunities in the computer industries in a wide-range of programming areas. Feel free to converse with me at my e-mail address, cwhamman@home.com.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
All right, here are the facts:
If you want to make 2D games, Direct X(including mainly direct draw) is better.
The problem with direct x is 1) it is made by microsoft and 2) it does not support multi platform.
A good thing is that there are alot more GOOD books and tutorials on the net for Direct X, compared to OpenGL, which is only supported by NeHe(neon helium, tutorials) and one book written by the GDNet staff.
OpenGL is a bit easier to learn, and the staff did a good job on the book.
OpenGL is able to support all platforms, this is a pro because you dont want your game to be just windows sometimes.
Basically, you have to learn Direct X anyway, even if you do learn openGL, for Direct Input and Sound, and also making the game multiplayer.
So, it basically comes to this question:
bool twoD;
bool direct x = FALSE;
bool opengl = FALSE;
if(twoD)
//learn direct x
direct x = TRUE
if(!twoD)
//learn OpenGL
opengl = TRUE
Since most of the the other peopel i said it in plain words to didnt listen, I decided to use that approach. Good Luck.
"I''''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''''Urden
If you want to make 2D games, Direct X(including mainly direct draw) is better.
The problem with direct x is 1) it is made by microsoft and 2) it does not support multi platform.
A good thing is that there are alot more GOOD books and tutorials on the net for Direct X, compared to OpenGL, which is only supported by NeHe(neon helium, tutorials) and one book written by the GDNet staff.
OpenGL is a bit easier to learn, and the staff did a good job on the book.
OpenGL is able to support all platforms, this is a pro because you dont want your game to be just windows sometimes.
Basically, you have to learn Direct X anyway, even if you do learn openGL, for Direct Input and Sound, and also making the game multiplayer.
So, it basically comes to this question:
bool twoD;
bool direct x = FALSE;
bool opengl = FALSE;
if(twoD)
//learn direct x
direct x = TRUE
if(!twoD)
//learn OpenGL
opengl = TRUE
Since most of the the other peopel i said it in plain words to didnt listen, I decided to use that approach. Good Luck.
"I''''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''''Urden
------------------------------Put THAT in your smoke and pipe it
There is a very simple way to decide which to learn first. If you think that the Win32 is well designed and that MFC is just what the doctor ordered for Windows programming, DirectX is what you''re looking for. If you despise MFC or think Win32 is sloppy and crappy, go with OpenGL.
Check out my raytracer at http://simp-raytracer.sourceforge.net. Download it at http://www.sourceforge.net/projects/simp-raytracer.
August 20, 2001 09:52 PM
OpenGL and DirectX aren''t comparable anyway. You want to compare OpenGl and D3D. OpenGL can be used to make 2D graphics also, but you may want to do platform specific graphics: DirectDraw for windows, QuickDraw for Macintosh.
Does it really matter what API you chose? I use OpenGL because I''m porting my engine, assuming I ever finish it (I keep restarting it because I get bored with it
).
Here''s how you pick:
If you''re going to port the game: Use OpenGL (you can use the SDL, OpenAL, BSD Sockets*, and other crossplatfrom libraries to get away from DirectX completely).
Otherwise: Take a look at OpenGL code. Take a look at DirectX code. Which do you like more? Use it
. If you know C/C++ well (you said you do), then you shouldn''t have a hard time with either of them.
*: BSD Sockets are only sort-of crossplatform, but there are other corssplatform networking libraries out there.
[Resist Windows XP''s Invasive Production Activation Technology!]

Here''s how you pick:
If you''re going to port the game: Use OpenGL (you can use the SDL, OpenAL, BSD Sockets*, and other crossplatfrom libraries to get away from DirectX completely).
Otherwise: Take a look at OpenGL code. Take a look at DirectX code. Which do you like more? Use it

*: BSD Sockets are only sort-of crossplatform, but there are other corssplatform networking libraries out there.
[Resist Windows XP''s Invasive Production Activation Technology!]
Learn both!
Not very indepth knowledge but don''t just look at the code.
I started with OpenGL and know I knows its places for use. I then learned Direct3D and learned its places for use.
If at 14 you have as much under you belt as you claim, then learning 2 API''s isn''t a problem at all.
Not very indepth knowledge but don''t just look at the code.
I started with OpenGL and know I knows its places for use. I then learned Direct3D and learned its places for use.
If at 14 you have as much under you belt as you claim, then learning 2 API''s isn''t a problem at all.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement