DirectX or OpenGL

Started by
5 comments, last by frob 10 years, 10 months ago

Hey guys,

As mentioned in my previous post, I am at the beginning of my "Game Developer's Journey". You can find it here:

http://www.gamedev.net/topic/644253-the-very-beginning-of-a-game-developers-journey/

A simple question is:

Should a game developed in OpenGL using pure GLut, or further in DirectX. Where are the benefits or doesn't matter which one I am going to choose?

Greetings, The Proof

____

more than innovation.

Advertisement

I would suggest you search the forums and internet. This question has been asked here many times. The trouble with a question like this is it often degenerates into a holy war between two factions.

Just read the information that's available already and make a decision based on what seems best for you.

Bottom line is they do pretty much the same. I'm working on a personal project that i have no plans on selling to the market and i only use Windows operating system. So i use DirectX.

If i was to make a game with a game engine i'll make from scratch and try to maximize the reach of my game in the market(different platforms), i would likely implement my rendering engine using OpenGL first.

If i have a lot of money, i would hire a team to develop my rendering engine capable of using DIrectX and OpenGL then use the appropriate grpahics api for the platform my game is running on; DirectX for Windows and OpenGL for other platforms.

Ultimately you should learn both, but just pick whichever you feel most comfortable with to start out.

It's far more important to not overreach yourself when starting out. E.g, and in the case of OpenGL, you sometimes see statements along the lines of "you should pick OpenGL because that means you can target Windows, Mac, Linux, PS3, iPhone, Wii, etc". Aside from being false, this is one of the worst reasons to choose an API when starting out. You need small achievable goals, and wanting to hit every platform under the sun is neither small nor achievable for a beginner.

Instead make your choice based on which API's syntax pleases you most, which one looks as though you might be able to start getting stuff done easiest in, which one is most appropriate for the platform (and make it one platform) that you want to learn on. Learning should be fun, joy, exploration and excitement, and with a sense of genuine achievement at the end, so your choice should reflect what it takes to get you there.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Benefits to GL: Supports Windows and non-MS platforms simultaneously.

Benefits to DX: MUCH better supported on MS platforms than GL.

Everything else is secondary. But for the love of god don't use GLUT. Look at GLFW or SFML.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Just a little note - DX and GL are incomparable - you should compare D3D and GL, as whole DX doesn't contain just 3D graphics.

#Promit - you can always use directly WGL, GLX and/or AGL instead of GLUT. It takes a lot more time (unless WinApi/Xlib are the best friends for you), but you should be able to support multi-monitor configurations (sfml doesn't support them yet afaik, dunno whether it will ever be), making it full 64-bit, and other "heavy-wizardy" stuff. ... and probably every toolkit for windows like Gtk or Qt also has their own OpenGL support (adding this just in case you already use Gtk or such).

All in all, you can basically do the same stuff in both apis... with just minor differences. I presonally, as long time C user, prefer GL syntax (but this is personal preferrence and it will differ).

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Hey guys,
Where are the benefits or doesn't matter which one I am going to choose?

Both have their benefits and drawbacks. For a beginner, it doesn't matter. Try both. Most people discover an instant preference for one or the other.


Also from the forum FAQ:

"This" versus "that" threads are considered flame bait and will usually be closed on sight. Such questions have usually been asked before, several times, so there should be no need to ask them again.

This question has been asked hundreds (thousands?) of times on the board, and is asked on a near-weekly basis.

As Dave Hunt pointed out above, whenever this same OGL vs D3D question is allowed to remain open the threads quickly become flame wars. Good comparisons are trivial to find using the search box. The information in the above posts should be enough to help you in your web searches. Closing.

This topic is closed to new replies.

Advertisement