Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


API Wars horror - Will it matter?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
29 replies to this topic

#1 Migi0027 =A=   Crossbones+   -  Reputation: 1981

Like
0Likes
Like

Posted 21 July 2013 - 04:34 PM

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.


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!


Sponsor:

#2 TheChubu   Crossbones+   -  Reputation: 4581

Like
-1Likes
Like

Posted 21 July 2013 - 05:09 PM

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.


Edited by TheChubu, 24 July 2013 - 09:29 AM.

"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


#3 TiagoCosta   Crossbones+   -  Reputation: 2343

Like
2Likes
Like

Posted 21 July 2013 - 05:17 PM

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


Edited by TiagoCosta, 21 July 2013 - 05:25 PM.


#4 Matias Goldberg   Crossbones+   -  Reputation: 3575

Like
3Likes
Like

Posted 21 July 2013 - 07:07 PM

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.

Edited by Matias Goldberg, 21 July 2013 - 07:07 PM.


#5 Promit   Moderators   -  Reputation: 7342

Like
14Likes
Like

Posted 21 July 2013 - 07:55 PM

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. 



#6 marcClintDion   Members   -  Reputation: 431

Like
-11Likes
Like

Posted 21 July 2013 - 09:10 PM

Microsoft likes to use DirectX to launch the newest OS they have for sale.  Microsoft has almost unlimited resources and lines of credit.  They can dump a billion dollars a year into the newest version of DirectX if they want to. 

 

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. 

 

If the drivers for a major hardware company is having problems with a new DirectX API, You can be sure Microsoft will throw money at the problem to make it go away. 

OpenGL doesn't have this vastly wealthy champion to ride in and fix problems in a timely fashion.

 

If DX didn't run at least a little bit faster, then I'd have to ask, "where is all that money going?"  Of course newer features are often faster and more consistent across GPU's.

 

Personally, I'm not going to help MS black-ball people into buying a new OS. 

 

If you choose one or the other, I'd say you should choose which ever one feels most natural for you, I modify this point with a few more as follows.

 

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

 

Now I also consider cross-platform issues.

 

I also now consider this to be an ethical issue as well. 

 

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.  If money is all you think about, then team up with MS and you'll likely be very happy as well.

 

If you feel that DX is the better API then use it, otherwise don't, or learn both. 

 

There is no "war", this is drama and rhetoric for people who are upset at having to learn more than one thing, sort of like-> "Use what I prefer or you're a stupid-head!"


Edited by Josh Petrie, 22 July 2013 - 10:23 AM.

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


#7 Promit   Moderators   -  Reputation: 7342

Like
10Likes
Like

Posted 21 July 2013 - 09:24 PM


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.


Edited by Promit, 21 July 2013 - 09:24 PM.


#8 Hodgman   Moderators   -  Reputation: 31131

Like
11Likes
Like

Posted 21 July 2013 - 10:24 PM

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.


Edited by Hodgman, 21 July 2013 - 10:51 PM.


#9 marcClintDion   Members   -  Reputation: 431

Like
-17Likes
Like

Posted 21 July 2013 - 10:24 PM

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.


Edited by Josh Petrie, 22 July 2013 - 10:23 AM.

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


#10 Promit   Moderators   -  Reputation: 7342

Like
6Likes
Like

Posted 21 July 2013 - 11:55 PM


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.


Edited by Promit, 21 July 2013 - 11:57 PM.


#11 Promit   Moderators   -  Reputation: 7342

Like
7Likes
Like

Posted 22 July 2013 - 12:09 AM

Ahem. Getting back to the point: Direct3D is great and there is no particular reason to jump away from it. OpenGL mostly works fine too, it's not ideal on Windows but I'm using it and getting by. (Allows me to share a lot of code.) The key point is to understand the underlying concepts and the underlying hardware -- and to some extent the OS and drivers, as well. With those things in hand, the APIs are really nothing more than necessary tools. Switching between them is just a matter of practical hassles, rather than any particular learning curve.

 

If I were teaching modern interactive graphics to undergraduate students today, I would spend the first few lectures on hardware and math. Those are far more important.


Edited by Promit, 22 July 2013 - 12:10 AM.


#12 Orangeatang   Members   -  Reputation: 1636

Like
14Likes
Like

Posted 22 July 2013 - 01:27 AM


If UbiSoft offers to pay Microsoft for one of their DirectX consulting programmers, you don't think that this will happen?

I'm an engine programmer at Ubisoft. DirectX consulting programmers don't exist. This doesn't happen.



#13 Migi0027 =A=   Crossbones+   -  Reputation: 1981

Like
2Likes
Like

Posted 22 July 2013 - 02:18 AM

I'm sorry about the "James Camarack" thing. biggrin.png

 

And I have to thank you again, for clearing things up for me!


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to steal all their shaders!


#14 TiagoCosta   Crossbones+   -  Reputation: 2343

Like
1Likes
Like

Posted 22 July 2013 - 02:51 AM

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.

 

 

My bad huh.png That's what I remembered reading in the past, but like I said I never programmed for the PS3.



#15 phantom   Moderators   -  Reputation: 7411

Like
1Likes
Like

Posted 22 July 2013 - 06:31 AM

My bad huh.png That's what I remembered reading in the past, but like I said I never programmed for the PS3.


At the start of the PS3's life time the fact a OGL|ES implementation existed was jumped on by the 'opengl everywhere!' gang and has since been reported as a fact the PS3 uses OpenGL... alas to this day the misinformation exists and thus this common mistake crops up sad.png

#16 Khatharr   Crossbones+   -  Reputation: 3031

Like
0Likes
Like

Posted 22 July 2013 - 06:32 AM

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

 

 

Oh dear... We've created a monster...

 

WITH CHAINSAW POWERED LASER BEAMS!


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#17 RobTheBloke   Crossbones+   -  Reputation: 2349

Like
4Likes
Like

Posted 22 July 2013 - 06:54 AM

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

It's simpler. There is less variation in the drivers, and the debugging/authoring tools are much stronger.

 

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

    Probably not. It won't buy you much.
     
  • Should I even worry about this? unsure.png

    No.


     

  • How does the future look for DX and OpenGL?

    Same as always. New features will be added to the GPU. A new version of the API's will be released. Neither are going away any time soon.
     
  • What API does PS3 use?

    Native calls to the hardware. There is (a really bad) GLES implementation on top of the native calls, but no one uses it.
     
  • Is it normal to dream about API Wars? wacko.png

    Less so than it used to be. Both api's are pretty much the same save for some syntactic sugar.


#18 RobTheBloke   Crossbones+   -  Reputation: 2349

Like
0Likes
Like

Posted 22 July 2013 - 07:00 AM

 


If UbiSoft offers to pay Microsoft for one of their DirectX consulting programmers, you don't think that this will happen?

I'm an engine programmer at Ubisoft. DirectX consulting programmers don't exist. This doesn't happen.

 

 

AMD, Intel, Microsoft, and Nvidia, all have their own Field Application Engineers that are available to help optimise CPU/GPU codepaths for your product.
So yes, it can, and absolutely does happen. (although I'm in no way implying that marcClintDion is correct in everything he says obviously!)


Edited by RobTheBloke, 22 July 2013 - 07:04 AM.


#19 NightCreature83   Crossbones+   -  Reputation: 2936

Like
0Likes
Like

Posted 22 July 2013 - 08:25 AM

 


If UbiSoft offers to pay Microsoft for one of their DirectX consulting programmers, you don't think that this will happen?

I'm an engine programmer at Ubisoft. DirectX consulting programmers don't exist. This doesn't happen.

 

The only graphics consultants you get in are the AMD and NVidia guys and mostly only if you have a deal with them to do a certain feature for their hardware. And there is a whole lot of nasty that happens with these deals as well as these guys pick their respective rivals driver apart and ask you to do features they know are faster in their implementation just to keep on top of the performance lists if your game is a benchmark game.


Edited by NightCreature83, 22 July 2013 - 08:28 AM.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max

#20 Promit   Moderators   -  Reputation: 7342

Like
1Likes
Like

Posted 22 July 2013 - 08:28 AM


AMD, Intel, Microsoft, and Nvidia, all have their own Field Application Engineers that are available to help optimise CPU/GPU codepaths for your product.
So yes, it can, and absolutely does happen. (although I'm in no way implying that marcClintDion is correct in everything he says obviously!)

I'm not sure about MS on the Windows side, but this is absolutely the case with the hardware companies, and for Xbox and PS devs too. That's partly what those NVIDIA/AMD splash logos on games are about. And developers DO get paid to support new DirectX versions and features. All the time. Quite a bit of money changed hands when DX11 was released, in order to have some games support it. The payers are simply the people who get the most immediate and concrete benefit from gamers needing the latest DirectX features. That's not Microsoft, it's the IHVs.

 

What Microsoft has done, historically, is to go out of their way to make DirectX development easy for small and large developers. And they did that very well for a very long time.


Edited by Promit, 22 July 2013 - 08:30 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS