API Wars horror - Will it matter?

Started by
28 comments, last by TheChubu 10 years, 8 months ago

Hi guys,

as you know, there is this war called the api wars, which will probably stay there for quite long. When looking at the popular companies now, such as CryTek, Epic Games and so on... Their game engines are focused on DirectX (Direct3D), weather it is because the marketing or because d3d has an advantage I'm still not quite sure off yet.

As a lone developer, or a shy one, I personally use DirectX. I can't exactly remeber why i picked dx, but this may be why:

As I was younger, the way I discovered Game Engines was to find a popular game on Wikipedia, and then read the page, and almost all the games I found used Directx/3D, so I guess that's why I chose it.

I have a small engine myself, which has been through alot, using C++ and Directx, and I have had a great pleasure in programming it, as a hobby. But then I became so worried when I started reading that OpenGL is better because it is portable and sometimes faster, blablabla... And then another one where James Camarack admitted that D3d is faster that OpenGL. But my real worry is, that when going to high school/university, I've read that they use OpenGL, so will I have to relearn it all? Or will it be easy as I'm already familiar with D3d? And how easy is it to convert a D3d project to opengl?

Actually one night I dreamt about this descision, and chose opengl, I think, which scares me happy.png .

So my questions are:

  • Why is Direct3D preferred by the large companies? (Dice, CryTek, Epic Games...)
  • Should I port my engine to OpenGL. (I have no thoughts of making my engine cross-platform)
  • Should I even worry about this? unsure.png
  • How does the future look for DX and OpenGL?
  • What API does PS3 use?
  • Is it normal to dream about API Wars? wacko.png

Well, thank you as always!

PS. My engine is in the signature if you want to know.

PS. I havn't spell checked this, going to do that the next morning.

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

Advertisement
And then another one where James Camarack admitted that...

roflmao hahahahahahaha That one is saved for posterity.

EDIT: People, "James Camarack" sounds funny. That's all I have to explain about this post. I don't know why people keep upvoting/downvoting it, it just sounds funny, that's all.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Why is Direct3D preferred by the large companies? (Dice, CryTek, Epic Games...)


I'm not sure because I don't work in a large company, but I'll guess that's the API they used in their previous projects and since it works and OpenGL won't give any big advantage why bother switching to OpenGL?

Also I'm guessing that the XBox 360 Direct3D version is more similar to Windows Direct3D than OpenGL is to PS3 OpenGL-based LibGCM.

Or it might just come down to preference...

Should I port my engine to OpenGL. (I have no thoughts of making my engine cross-platform)


Unless you want to learn OpenGL or a new version is released with awesome features that Direct3D doesn't support why waste time that could be used to add a cool new feature to your engine?

Should I even worry about this? unsure.png


No. If you know Direct3D learning OpenGL is really easy.
It's mostly functions with different names that do the same thing. They both use shaders, vertex/index buffers, render targets, etc. The differences are small and it's easy to google the answers.

I would say its like learning Java when you know C#, it mostly works the same way.

How does the future look for DX and OpenGL?


As you can see from the new versions of Direct3D (11.1 and 11.2) the changes are mostly small improvements, nothing revolutionary is being released, and the same goes for OpenGL.
I'm pretty sure we won't see a completely redesigned API update like Direct3D 9 to 10 anytime soon.

What API does PS3 use?


A modified version of OpenGL (more specifically OpenGL ES if I'm not mistaken) called LibGCM, but I never used it. I'll let someone else give more info.

Is it normal to dream about API Wars? wacko.png


You might be wasting more time thinking about it than you should xD

And then another one where James Camarack admitted that...

roflmao hahahahahahaha That one is saved for posterity.


Its a crossover of James Cameron and John Carmack happy.png

Well, luckily there's a great answer already posted regarding GL vs D3D.
And like the article explains, it's a history lesson, and epic failure on OpenGL's part.
Though today Microsoft is pulling some very irritating behaviors lately of having DX 11.1 for Windows 8, and DX 11.2 for Windows 8.1; not to mention their API documentation has became worst on every iteration of the API.
If they keep doing it (and Khronos Group doesn't fall asleep AGAIN) then GL may get a boost once more (but a redesign is needed).

What API does PS3 use?


A modified version of OpenGL (more specifically OpenGL ES if I'm not mistaken) called LibGCM, but I never used it. I'll let someone else give more info.

LibGCM is a library for very low level GPU access. The provided (partial) OpenGL implementation for PS3 built on top of libGCM is very slow and useless, to the point developers just prefer to work with libgcm directly (and it's more flexible btw.)

Is it normal to dream about API Wars? wacko.png

Actually, I dream of some day making a game called API Wars where two transformer-looking robots called Direct3D and OpenGL fight in a match to the death; shooting triangles bullets and recharging their Z Buffers for powerups.

There's no war. The only platform where you have a choice is desktop Windows, and on Windows Direct3D works better. End of story, period, full stop. OpenGL might be more convenient for many (including myself) but it does not and never has worked as well as Direct3D. That's why large companies prefer it.

On every other platform, there is no question. Universities teach OpenGL because most of their coursework and most of the professors' experience is derived from Unix/Linux work of questionable quality. Very few universities have graphics courses and education that is up to date with modern interactive computer graphics. (Maybe two dozen reasonably big name schools that I can think of across the US, it's gotten better over the last few years.)

The simple truth of the matter is that OpenGL is a mess. To write good OpenGL code that is high performance and in sync with modern techniques is hard because the resources out there are shitty and the API doesn't try very hard to help. (No, core profiles don't help. Ask me another time.) So beginners end up doing a lot of things that are bad, but they have no way of knowing it's bad or finding someone to point that out. Working in D3D 11 forces you to take exactly one approach that is very well structured, very well documented, and very difficult to get wrong. And moving to OpenGL after that experience is relatively straightforward. The same doesn't tend to apply in reverse.

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

Also if a game company wants to use some obscure new DX function they can call up somebody at Microsoft and have a programmer leased to them until the issue is solved.

I'm sorry, but this world exists only in your mind. A lot of us are annoyed because DX support from Microsoft is the worst it's been in literally decades.


I do not like how Microsoft does business and I am not going to help them any more than I have to. This is no different then the idea of voting with your wallet. If you do not like how they do business then don't support them any more than you have to.

You have a twisted view of the world and it's not healthy. Either you're making Windows/Xbox software or you're not, whether you use DX or GL or a softrast makes no difference to MS. If you don't like being part of the Windows/Xbox ecosystem/cabal/whatever, fine -- but it has absolutely nothing to do with graphics or APIs. It's a religious issue.

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

PS3 OpenGL-based LibGCM

I wouldn't call GCM "OpenGL-based". It's a procedural C-API, which makes it look a lot more like GL code than D3D code, but it's design is completely different from GL's design. If anything, I'd say it's based on nVidia's internal GeForce7 driver code, stripped down (which they'd then build GL and D3D interfaces on top of).

In any case, Migi0027, there's not much chance you'll ever end up using GCM at this point. You'd only be using it if you got a job at a professional studio who was making PS3 games, and most of them will very soon be making PS4 games instead ;)

There's no war. The only platform where you have a choice is desktop Windows, and on Windows Direct3D works better. End of story

This. Every different platform has it's own "native" graphics API.
If you want to write truly "cross platform" code, you'll have to know: D3D9, D3D11, GL1, GL2, GL3, GL4, GLES, GLES2, WebGL, GX, GCM, GCX, etc, etc, etc...

Simply learning OpenGL is in no way a silver bullet for having "cross platform" code.

With many of the above, you'll also have to make changes to your code not just for each platform, but for different hardware/drivers within a particular platform. e.g. some phones may support a particular texture format, while others don't, etc... or some PC GPUs might support some shader operation, while others' don't.

Why is Direct3D preferred by the large companies?

I prefer it on Windows, because it's more reliable than OpenGL on Windows, due to the fact that most of D3D is implemented by Microsoft, and is thus the same on everyone's PC.
To contrast: GL has no central body that enforces compliance with the specification. On Windows, OpenGL is implemented in the graphics driver, so 3 users with 3 different GPUs/Drivers, might be running three completely different implementations of OpenGL! My code might work fine for one of them, and have bugs for the other two that I've never noticed, because I've never tested my code with their particular driver.


On Mac, OpenGL is mostly implemented by Apple (like how MS implements D3D) -- they've stepped up to enforce compliance with the spec, so this problem doesn't exist as much, so GL is less objectionable on Mac. In any case, GL is your only option on Mac, so all the engine companies that you've quoted do also support GL for their Mac versions.

On Linux, your only choice is OpenGL, but the situation is just as dire as on Windows. There is no central authority (e.g. MS/Apple) to ensure that GL strictly follows the spec, so like on Windows, OpenGL is entirely implemented by your graphics driver. You game might run fine on one driver, and be buggy on another driver. To test your game, you need to test it against every different GPU driver that you want to support... but, if you want to support Linux, it's your only choice to deal with this shitfest.

To sum that up:

Windows - MS does work to ensure D3D is stable. GL is still an option, but with with only each GPU manufacturer supporting it on their own.

MacOS - Apple does work to ensure GL is stable. There is no other option.

Linux - You're on your own with GL or Wine. Plus you've got distros that even refuse to support official nVidia/ATI drivers out of ideology...

Web - It's the wild west, a new frontier! Use Flash, HTML5 Canvas, WebGL, Java, Silverlight, etc at your own risk.

Mobile - You're on your own with GLES. Test every device you want to support to discover their quirks!


So personally, I choose to use D3D on Windows and OpenGL on Mac for stability/ease-of-development, even though it means twice the work inside my low-level renderer library.
Basically, I have to port my code to every different platform that I want to support. I just see this as a fact of life. With OpenGL's inconsistencies (outside of MacOS), I don't like to use it because I'm also forced to port my code within a platform (e.g. supporting different drivers).

That's not to say that GL on Windows is the wrong choice though! It is entirely usable, and certainly a lot of professional Windows games have been released using OpenGL!
I disagree with almost everything marcClintDion said above, except for this bit of truth:

you should choose which ever one feels most natural for you.
If you feel that DX is the better API then use it, otherwise don't, or learn both.


I started with OpenGL because it made sense to me sooner than DX did.

Except I'd say that you should learn both anyway, in the long run!

I did also find GL easier to get started with when I was first learning ;)

Should I port my engine to OpenGL. (I have no thoughts of making my engine cross-platform)

If you want to release it on Mac or Linux, then yes, you'll have to port it. Otherwise, there's no reason to do that work.

But my real worry is, that when going to high school/university, I've read that they use OpenGL, so will I have to relearn it all?

This shouldn't really be a problem. Once you've learnt one graphics API, it's very easy to learn others.
I don't even worry about it any more... as long as I've got a reference manual for a new API, I can start working with it almost immediately.

Also if a game company wants to use some obscure new DX function they can call up somebody at Microsoft and have a programmer leased to them until the issue is solved. I'm sorry, but this world exists only in your mind. A lot of us are annoyed because DX support from Microsoft is the worst it's been in literally decades.

Really. This only exists in my mind.... If UbiSoft offers to pay Microsoft for one of their DirectX consulting programmers, you don't think that this will happen?

As for the rest of the insulting things you said to me, I'll respond with the following. Promit, you're an idiot. People like you are the reason sites like this have such bad reputations for being overpopulated with arrogant, condescending, know-it-all, half-wits. You're one of the big-fish in this department.

Consider it pure joy, my brothers and sisters, whenever you face trials of many kinds, 3 because you know that the testing of your faith produces perseverance. 4 Let perseverance finish its work so that you may be mature and complete, not lacking anything.


Really. This only exists in my mind.... If UbiSoft offers to pay Microsoft for one of their DirectX consulting programmers, you don't think that this will happen?

"DirectX consulting programmers" -- these people don't even exist. There's not enough people working on the runtime and tools right now, let alone helping OTHER companies. Xbox developers get much more solid support, but that has never translated into consulting services. More like "priority bug fixes".


As for the rest of the insulting things you said to me, I'll respond with the following. Promit, you're an idiot. People like you are the reason sites like this have such bad reputations for being overpopulated with arrogant, condescending, know-it-all, half-wits. You're one of the big-fish in this department.

I've been here for twelve years plus, I've worked for this site, I'm a moderator, I've worked in the industry, and I've worked for Microsoft and NVIDIA. I know exactly what I'm talking about. You can think whatever you want and you can get as angry as you want. I will still be here long after you've run out of fantasy bullshit and I will always be here to call you out on it. The solution is to stop synthesizing posts that have no basis in reality. If you don't like it, you are welcome to leave any time. Until then, deal with it.

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

This topic is closed to new replies.

Advertisement