Archived

This topic is now archived and is closed to further replies.

karole

OpenGL or DirectX ??

Recommended Posts

I don''t mean to sound mean or rude or anything, but why is this questions asked like every day?

Honestly now, just read the forums! Different people''s opinions on the two tossed back and forth in this beginners section every single day... all you have to read every other post that has been made.

I''ll make it simple though... neither has a "majority" advantage. Just pick and have fun with it!

Share this post


Link to post
Share on other sites
I''ll give you a very honest answer. It depends.
It really does depend on several factors.
1. What do you want to do?
2. What is your currently knowledge?
3. Do you care about portability?

Number one will catagorize if you want to do a simple 2D side scroller, 2D puzzle game, 3D FPS, or the next Quake. If you want to do 2D, I personally like DX (as long as you stick with DX7, I don''t like DX8''s interface for 2D) You will find people with different opinions on that I''m sure If this is what you want to do, I''d recommend looking into wrapper classes. There are many out there, I''d recommend checking CDX. Very nice lib. If you want to dive right into 3D, first check the comments for question number 2, then decide how you want to do this... This can get extrememely indepth. OpenGL has a very easy coding style and tends to be easy to pick up for this. Where as DX tends to be nicer about doing new tricks. No bothering with extensions...

Number two is probably the most important question of them all (I really should have put that at number one, but look how much I''ve typed already...). If you are just starting out/just learned C++/just took a class on programming/newbie, don''t dive right into 3D. Not until you can write a console app that runs. Then write a basic windows app, then write a GDI app, then write a basic 2D app, then start thinking about how to dive into 3D. I''m not saying it can''t be done, just that it''s very hard. If you have been programming for a while and are ready to dive in, then I think it''s going to depend on your code style a little too. DX tends to be a little more "get your hands dirty", type-in-absolutely-everything-including-things-you-don''t-think-are-important kind of coding. Which can be good. But OpenGL is more state based, and I think looks cleaner. Which when you are just starting out, can make a big difference between understanding what your looking at and throwing your computer out the window. What I''d recommend is look at newbie 3D code, and see which one jumps out at you. I''d recommend NeHe for OpenGL, and maybe NeXe or Drunken Hyena for DX. Good sites.

Number three isn''t directly related, but some people choose OpenGL because it can be ported to different platforms. If you don''t care if you game/app can be ported to Linux/Mac/BeOS/Windows, then make sure you don''t consider that. You''ll find people touting that as a good reason for choosing OpenGL. And it is, only if you are thinking of doing that...

Well I''ve rattled on enough. It''s going on 2am now... I should really get to bed

Always remember, you''''re unique. Just like everyone else.

Share this post


Link to post
Share on other sites
People say that OpenGL is not object oriented and can cause a great possibility making the code messy. DirectX is more organized compared to OpenGL. The rest of the difference is already explained by Greven. But for me, portability is one of the most important thing in choosing between DirectX and OpenGL. I''ve heard that PS2 also supports OpenGL (in addition to their own graphic libraries), but Xbox uses DirectX. It''s just a matter of preference, which one do you like, vanilla or strawberry?


My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-

Share this post


Link to post
Share on other sites
quote:
Original post by zer0wolf
I don''t mean to sound mean or rude or anything, but why is this questions asked like every day?



This is the beginners forum. Beginners usually have the same problems (e.g. which API to use). Consequently the same topic may surface a number of times here.

quote:
Original post by zer0wolf
Honestly now, just read the forums! Different people''s opinions on the two tossed back and forth in this beginners section every single day... all you have to read every other post that has been made.



Not true. These threads get closed IMMEDIATELY, hence you have to go a while back to actually find some serious discussion about the OGL vs. DX issue. Things may have changed in the meantime. I don''t see anything wrong in a newbie to ask this kind of question. It goes with the territory.

quote:
Original post by zer0wolf
I''ll make it simple though... neither has a "majority" advantage. Just pick and have fun with it!

True.

and to the original poster: there''s an article here on gamedev that compares OGL and DX. Read it. But really, neither is the other superior.

quote:
Original post by nicho_tedja
People say that OpenGL is not object oriented and can cause a great possibility making the code messy



It''s true that the OGL API is not OOP - but that does in no way hinder you in making your engine OOP.




**************************
The best way to accelerate a Win9x machine is at 9.81m/s2

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.