OpenGL or DirectX

Started by
18 comments, last by PatrickD 20 years, 11 months ago
Right now I''m using dev-c++. What''s the best choice? Do they differ to much in speed/or anything else?
Advertisement
If you are a beginner, I would strongly, strongly recommend using OpenGL. I have used them both, and OpenGL is much more intuitive and easier to get started with. I also find it a lot easier to play around with it, to change around settings and see what happens.

People make professional games using both packages, so there isn''t really a question of which is better for gaming. DirectX is probably more popular, but don''t forget that ID software uses OpenGL, and they are about as cutting-edge as you can get.

I''m sure that one package does a certain thing a little faster than the other. But the thing about programming is, a lousy design will *always* be slower than a good design, and it would take a professional-grade programmer to write a design good enough that the speed differences between OpenGL and DirectX would actually make a difference.
eh, this post will be closed as quickly as a mod sees it hehe
some people get into heated debates over this

they both have basically the same functionality, just choose which one seems more appealing to you
i would go to nehe.gamedev.net and nexe.gamedev.net and look at the intro tutorial and maybe some other code snippets to see which style makes more sense to you

that is what was reccomended to me and i decided to go with opengl (right after i bought totwgpg using dx :\)
I agree with andy_fish and think that you should go with the OpenGL API (application programming interface). However you will probably realize that you may want to use DirectX with OpenGL. The reason why is that OpenGL is only a grafix library there is no input/output, no sound, no networking for multi-player games. You could think of DirectX as just another one of Microsofts bundle software packs. DirectX is composed of: DirectDraw, Direct3D, DirectInput, DirectSound, DirectMusic, DirectPlay, DirectShow. when you use OpenGL you basically are replacing Direct3D. so the real question you should be asking yourself is Direct3D vs. OpenGL.
http://www.gamedev.net/community/forums/showfaq.asp?forum_id=10

Read.

The code is the only difference.

What you really need to do is take a look at the first two or three NeHe tutorials, then take a look at a Direct3D 8 or 9 basic tutorial. Read through a few of each and decide which style you like more.
what is the differnce between dirct x and open gl for graphics?
There''s little to no difference between the two. They are the same speed and functionality. Most people will agree that D3d is hard to setup on dev-C++ as opposed to openGL, but not impossible.
Correct me if I''m wrong but for what I''ve seen so far OpenGL seems to only support 3d graphics (even though it''s more organized than DirectX), and DirectX supports 3d graphics but and it also has different libraries for sound, 2d graphics, etc. Doesn''t OpenGl have any libraries that handle these things?
Use both... No reason to limit yourself to one way of doing something.
"C and C++ programmers seem to think that the shortest distance between two points is the great circle route on a spherical distortion of Euclidean space."Stephen Dewhurst
opengl only does graphics. You can use external libraries for other things, such as fmod for audio and HawkNL for networking. Another good alternative is SDL, which handles windows as well as input, and is compatible with OpenGL.

As to which one, it doesn''t really matter. It''s not that hard to setup D3D, once you understand why you''re doing everything. I''ve used both, but currently I''m using D3D just because. The hardest part is understanding the underlying math behind all the 3D graphics. Once you understand that, you shouldn''t have trouble switching APIs.


''I never let schoolling get in the way of my education'' - Samuel Clemens, a.k.a. Mark Twain

Check out my raytracer at http://www.sourceforge.net/projects/simp-raytracer. Download it at http://simp-raytracer.sourceforge.net.

This topic is closed to new replies.

Advertisement