DirectX v. OpenGL (please respond)

Started by
15 comments, last by ah_bk88 20 years, 10 months ago
This question seems to be asked quite often. Perhaps the "For Beginners" section should have more on OpenGL and a link to some D3D vs. OGL page. Personally I prefer OpenGL because it''s cross-platform and it can be used in a variety of ways (including object-oriented) whereas D3D forces one to use COM objects.
Advertisement
I''d say on PC DIrectX is used more often for games. However, one or the other makes no difference in the long term. They pretty much do the same, and performance-wise, it''s 50/50. Ask John Carmack. You''ll learn the same tricks using either one of those.

OpenGL has some nice features over DirectX. You can do immediate rendering (no need to setup vertex buffers and stuff), which is useful for small apps and prototyping, it''s got the matrix stacks, and it''s easier to use (GLUT would get you going in a matter of hours, and it''s straight C function calls). In the short term, OpenGL is dead easy for noobs. You can find OpenGL wrapper libraries for DirectX, which makes DirectX more manageable. If you know openGL, you''ll know directX (with a bit of work on the vertex and index buffers), and vice-versa.

Everything is better with Metal.

Oliii made the good point that when you''re starting out OpenGL is easier, but in larger games you''ll need to use all the extra complexity with either one. to my experiance Direct3D seems more popular with commercial games for windows nowadays, but OpenGL is the leader of most the other markets. And since DirctX belnogs to microsoft you''ll pretty much need OpenGL for any non-windows development. Due to this a lot of other libraries that like platform independence prefer OpenGL too (SDL, wxWindows...).

So bottom line:
Windows game devlopment:
Both about as useful, Direct3D more popular

Most anything else:
OpenGL.

Though I run Linux so I never learned too much about DirectX, this is jsut what I''ve read.
quote:Original post by Oluseyi
Both. What''s so hard about learning both?
...
Both. Plus, if you''re asking about employment and which API to learn in the same post, you''ve got a long way to go...


Are you insane?! Do you have any idea of the amount of work that would entitle you to do?

Employeers don''t worry about which one you learned because if you know one, then you obviously have the ability to learn another API. And even if you were hired, they usually wouldn''t get you started straight into programming directly with the API.

______


To be honest, it''s all personal preference. I personally like the great OOP approach offered with DirectX.


Rob Loach
Current Project: Go Through Object-Oriented Programming in C++ by Robert Lafore

"Do or do not. There is no try."
- Yoda
Rob Loach [Website] [Projects] [Contact]
quote:Original post by Rob Loach
quote:Original post by Oluseyi
Both. What's so hard about learning both?
...
Both. Plus, if you're asking about employment and which API to learn in the same post, you've got a long way to go...
Are you insane?! Do you have any idea of the amount of work that would entitle you to do?

Employeers don't worry about which one you learned because if you know one, then you obviously have the ability to learn another API. And even if you were hired, they usually wouldn't get you started straight into programming directly with the API.
Aren't you contradicting yourself here? On the one hand, you say that the amount of work required to learn both is insane, and on the other hand, you say it would be easy to learn one once you knew the other, should an employer require you to.

Considering that most people asking this question have at least several years to go before they'll have a shot at a job, isn't that more than enough time to learn both? If it's not, then your second statement is wrong.
I learned both Direct3D and OpenGL on my own.
I''m not insane.
I feel comfortable using either.
All of these people that know both, by what information did you get there: What books do you recommend, etc.?

Like a sponge!
-----------------------------------------------------------Like a sponge!

This topic is closed to new replies.

Advertisement