Jump to content
  • Advertisement
Sign in to follow this  
Ancient Spirit

Help me please... I'm going mental...

This topic is 4846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well i have a problem... I don't know the difference betweem Direct3D and OpenGL. I don't care about multiplatform programming so that's why i'm having a hard time choosing... Can you please explain the difference between them and tell me what futures each one supports and which one is better in your opinion and why? A HUGE thanks in advance! I would really apriciate the answers... Sorry for the bad spelling...

Share this post


Link to post
Share on other sites
Advertisement
Well.. OpenGL is C-friendly (and alot of people, I'd say most think it's easier).. Direct3D uses a C++ API, with classes and stuff.. Now, it's said that NVidia cards work better with OGL, and ATI cards work better with Direct3D.. Not sure if it's true though.. Probably doesn't matter..

I use Direct3D, because it's a part of DirectX, which also has input and sound...

Other than that, they can do the same things really.. Mostly a matter of opinion..

Share this post


Link to post
Share on other sites
Nope, they are not the same. But generally, they both are layers of abstraction for the same functionality - hardware (+ drivers) functionality.

As DvDmanDT said, gl is pure C, DX is fully C++.
So if you're one of the OO fanatics, pick DX. And if you're more low-level writing maniac, pick GL. If neither of them, just throw a coin, as there's no point in thinking too much about it - many people have used one or another, and guess what, they survived (in both cases).

Share this post


Link to post
Share on other sites
functionality-wise, yes. performance-wise, yes. Ultimately, they both unlock the same features on any given graphics card. They are only APIs after all.

One or the other is a a choice, not about performance or functionality, but conveniance, target platforms, and how much you feel comfortable with.

1) OpenGL is the industry standard for all that is high-end graphics, such as architecture design, professional tools.

2) DirectX is the industry standard for gaming. This is mainly down to Microsoft policies, but fair enough, DirectX is great.

3) OpenGL has better cross-platform capabilities (except for microsoft platforms of course, such as the XBox). Macs, Linux, workstations, ect...It used to be also the standard in education. Now I'm not sure, DirectX and Win32 platforms are prefered to workstations (more cost effective). Back in my old days, there were no PC graphics accelerators to speak of (we used eventually FireGL cards).

4) DirectX is much more than just a graphics API. It does sounds, networking, inputs, music, ...

5) OpenGL is, in my opinion, very easy to work with. DirectX requires more ground work.

6) DirectX being the video game standard, you might find it easier to get help for anything DirectX related and game programming.

7) Because DX is initialy such a pain to work with, it kind of impose you working on well thought out designs, and C++ oriented code. OpenGL allows for more freedom, but also more sloppy coding. I find it great for making small demo apps. It is equally good at high end stuff, when used properly, of course.

Personnaly, I prefer OpenGL, but I'm not exactly a graphics expert. If I was really commited into programming games, DirectX would be a more sensible choice, since it's the most used and very well supported.

Bottom end. I'd go for DirectX if I were you. But I still love OpenGL :)

Share this post


Link to post
Share on other sites
Quote:
Original post by vNistelrooy
Basically same functionality. I'd suggest OpenGL to a beginner, though.


True, especially for someone not that experienced in programming. If you are experienced in C++ coding, and even better, win32 coding, DirectX will not be very difficult. But if you are kind of a noob, or not that confident, and you want to try some graphic things, OpenGL will get you there faster and more easily.

Thing is, people rarely stay beginners. If you are serious about programming games, DX is still in my opinion a more long term sensible solution. But after being well aquainted with game coding, switching from OpenGL to DirectX requires nothing special. It's not a big deal.

Share this post


Link to post
Share on other sites
I'd say go with DirectX just for the D3DX library. You get texture loading functions, vectors, matrices, quaternions, and text/sprite interfaces among other stuff. Saved me quite a bit of time.

Share this post


Link to post
Share on other sites
Quote:
Original post by oliii
2) DirectX is the industry standard for gaming. This is mainly down to Microsoft policies, but fair enough, DirectX is great.


For PC gaming yes, but the consoles make up about 80% of the industry's sales (the playstation 2 and gamecube don't use DirectX). I use OpenGL because of the portability issues, but if you don't care about that you can make great games with either OpenGL or DirectX. In the end it's the 3D concepts that are more important and you could make an engine that can use either as its renderer.

If you do decide to go the OpenGL route, the NeHe Tutorials are a great place to start. Also check out Beginning OpenGL Game Programming by Dave Astle and Kevin Hawkins - it's a good intro and pretty cheap as well.

You also might want to check out SDL for creating a window and handling input/sound (OpenGL is a graphics language, it only does graphics, so you need to use something else to create windows and get input from the keyboard).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!