It's not like there's this massive base of OpenGL code just waiting to be ported to embedded devices if there were just a few more API calls. Yes, there's glxgears, screensavers, and handful of open source games. You could probably get some old CAD programs to run on your Android.
But if we compare the massive number of newly written OpenGL ES applications to all the old OpenGL 1.x fixed pipeline apps, the latter seem insignificant.
As he so ably demonstrates, it's just not that hard to port the older apps either. This "All you engineers are idiots because I had to work THREE WHOLE DAYS to port this 20 year old code to an iPhone" just sounds childish and silly.
Except he didn't port his code to OpenGL ES - he ported the missing API from OpenGL 1.3 to OpenGL ES.
If it takes one developer three days to implement the missing API, then perhaps it suggests that this API wasn't in any way damaging to the new system and could have been left in place originally?
It didn't take him three days to port all of the cruft from OpenGL 1.3 to Open GL ES; it took him three days to port the precise calls and precise semantics he relied upon in OpenGL 1.3 to OpenGL ES, and even then he punted on some of it.
The latter is a far, far cry from the former. The former is basically what a modern OpenGL (non-ES) driver does to support all of the legacy cruft on modern hardware. Recall that the OpenGL API is an API for a state machine. All of those layers of cruft built up over the years have incredibly arcane state interactions, are a bitch to support, and are why modern OpenGL (non-ES) drivers have gotten rather quite bloated.
Edit: to tackle the second part of your comment:
> perhaps it suggests that this API wasn't in any way damaging to the new system and could have been left in place originally?
The Immediate Mode calls he complains about not being there? They were "removed" (never introduced) way back in OpenGL ES 1.0, which IIRC originally debuted in 2003.
It's a pretty big stretch to argue that because reimplementing Immediate Mode on top of OpenGL ES doesn't have a crushing performance penalty on 2012's iPhone, it wouldn't have been a problem on what passed for mobile hardware back in 2003.
(which is ignoring the fact that even if the performance back then wouldn't have been garbage, taking the opportunity to make breaking changes and throw out cruft for an API that wasn't expected to host legacy apps was absolutely the right move)
* It costs money to implement. Three days for a lone coder, much more than that for a careful consistent development process.
* It costs money to develop regression and validation tests.
* It costs money to test, including collecting all the different hardware it needs to be tested on.
* It costs money to fix bugs in it.
* It costs money to answer questions from developers about it.
* These costs are multiplied by every future version that will continue to support it.
* These costs are multiplied by the many vendors that will be required to implement it.
* Some of these costs are multiplied by every language that will support bindings to the API.
* It costs code space in embedded devices.
* It costs as much as a vendor wants to spend trying to make it perform as fast as possible.
* It costs conceptual complexity in developers' heads.
* It costs developers when they inadvertently do things the old inefficient way.
* It costs reputation when somebody compares benchmarks of your product using the old inefficient way against another vendor's product using the new recommended way.
* Requirements to continually support it at the same level of performance constrain your choices when developing new hardware.
* Sometimes it costs precious die space which could be better used for other things.
* The inefficiency sometimes increases power consumption and reduces battery life.
* Users are disappointed if every version of new hardware doesn't run the old inefficient code even faster than the previous version.
So if it doesn't have a real need to be there in ES 1.0 then, yes, it is actively damaging and should be thrown out in the rewrite.
While that's all true - it completely ignores the externalities. It cost Jamie 3 or 4 attempts and eventually 3 days work to get his unbroken code running on the new OpenGL version. What's the multiplier needed to account for the cost this change incurred for all the other developers who wrote code using OpenGL before ES?
Sure, maintaining backwards compatibility is costly for a project like OpenGL. But if you choose _not_ to maintain backwards compatibility, for whatever reason, and then someone shows that your reasoning is bogus by reimplementing the old API calls in 3 days, you should expect to get called "idiots". (And you then should either be sure enough in your convictions that you know jwz is wrong, or take it on the chin and say "Hey, we fucked _that_ one up. Mind if we include your code in our next release?")
This is a good question, and if you look a few posts up I started this comment tree by addressing it:
> if we compare the massive number of newly written OpenGL ES applications to all the old OpenGL 1.x fixed pipeline apps, the latter seem insignificant.
It was a design judgment they made and I think it was the right one.
> by reimplementing the old API calls in 3 days
JWZ did not produce a complete production-quality set of OpenGL 1.x compatibility APIs in 3 days. I'm going to guess without looking at his code that he didn't even write regression tests for the calls that he did implement.
What JWZ did was 3 days of possibly great coding, but that's only a tiny part of what needs to be done to ship new APIs in something like OpenGL.
> What's the multiplier needed to account for the cost this change incurred for all the other developers who wrote code using OpenGL before ES?
Let me ask you that - please list as many examples as you can think of of code written for OpenGL 1.x that would make sense to port to embedded devices.
> While that's all true - it completely ignores the externalities. It cost Jamie 3 or 4 attempts and eventually 3 days work to get his unbroken code running on the new OpenGL version. What's the multiplier needed to account for the cost this change incurred for all the other developers who wrote code using OpenGL before ES?
This is ignoring an awful lot of reality. Like, that OpenGL isn't a project that ships one software stack, but a standard managed by a group and voluntarily implemented by graphics vendors.
The Khronos group exists to negotiate between vendors and create a spec they're willing to implement, not to dictate to them a spec they hate and will ignore. There was a near riot when the OpenGL (non-ES) 3.0 was announced; many vendors were seriously pissed off that it didn't drop Immediate Mode and the the fixed pipeline and that they had to sink enormous amounts of time into writing and maintaining a compatibility layer on top of modern GPUs for shit that had been deprecated for damn near a decade. That meant not just writing an Immediate Mode shim for a tiny subset of OpenGL 1.3 like JWZ (and like countless other have done in the past), but doing shit like generating shaders on the fly based on the current state of the emulated fixed function pipeline, and making sure to cover all of the bizarre corner case interactions between all of that old fixed function garbage and threading and any new calls the program happened to mix in.
Vendors were ready to walk away from OpenGL over this. That's why the OpenGL 3.1 spec dropped the fixed pipeline like a hot potato and doesn't require that vendors ship a compatibility profile for the old crap.
Now, what if, back in 2003 when the decision to not include this stuff in OpenGL ES 1.0 was made, they'd released a spec requiring mobile vendors to do the same thing? What would the cost to JWZ and his project, and all other developers who wrote OpenGL before ES, have been if the mobile vendors had collectively told Khronos to fuck off? If OpenGL ES didn't even exist as a target for a shim, because there was no way in hell mobile vendors were going to ship a multi-meg driver that had to generate code on the fly, on the off chance anyone ever wanted to ship AutoCAD for hardware that barely had enough RAM to fit the driver?
Because there was certainly no guarantee, at the time, that OpenGL ES was going to become the standard for mobile graphics. It happened only because the standard that was proposed was something that the vendors were willing to ship.
> Sure, maintaining backwards compatibility is costly for a project like OpenGL. But if you choose _not_ to maintain backwards compatibility, for whatever reason, and then someone shows that your reasoning is bogus by reimplementing the old API calls in 3 days, you should expect to get called "idiots". (And you then should either be sure enough in your convictions that you know jwz is wrong, or take it on the chin and say "Hey, we fucked _that_ one up. Mind if we include your code in our next release?")
Oh come off it. He didn't reimplement ALL of OpenGL in 3 days. He reimplemented the tiny subset of calls, with the precise semantics (and only the precise semantics) his program needed, in 3 days. That's a far cry from shipping the entire behemoth that is a fully back-compatible OpenGL stack. And he's not the first guy to do this, or the 5th. I've got books on the shelf behind me with small Immediate Mode shims in their appendixes for people who want to do it "the old way". I've seen code to do it in forums and in repos. It's dead easy.
The Khronos group doesn't see this shit and think "damn, we fucked up". They think "Good. We gave vendors a decently small spec that they were willing to implement, allowing OpenGL ES to become the standard in mobile graphics, but we still managed to base it on well-chosen primatives that people like JWZ can use to build higher-level interfaces around if they choose".
He ported the OpenGL 1.3 app to OpenGL ES by implementing the missing parts of the API that he needed inside the OPenGL ES API (albeit, as some people have pointed out, imperfectly).
That is not the same as rewriting an app to conform to the new API. There is, as you say, a HUGE difference.
How much more help are you expecting him to provide? Why would it be any more "helpful" for him to put it in some revision control system instead of just posting the source?
No, I understand that point. I just don't agree with it in this case.
* "thou shalt not break working code". That's not some Universal Code of Software Engineering, that's just something he made up.
* No one in their right mind would expect you could port 20 year old C using OpenGL 1.x code to an iPhone with no effort.
* There are plenty of reasons APIs can benefit from breaking changes. Security fixes, major architectural improvements, platform porting, even general evolution and modernization. The question is always one of cost/benefit, relative pain vs relative gain.
* Sorry JWZ, but your X screensaver project is actually not an overriding concern driving the evolution of OpenGL ES.
* I didn't mention it again because so many other have pointed this out, but this isn't even the same API. OpenGL ES is not the same thing as OpenGL 1.x.
* Changing the major version number is a common and accepted way to indicate breaking changes are present in an API. The OpenGL board went even farther and gave it a different name and a different versioning scheme specifically because it is different.
"Sorry JWZ, but your X screensaver project is actually not an overriding concern driving the evolution of OpenGL ES."
Seriously, if you think that's a valid response, then you did not understand his point. Repeating something does not make it any more valid an argument.
OK I re-read his post. I think I understand his point. He has a something of a valid point, but what he is raising are considerations, not overriding principles.
If he wants to write his code by treating these as "thou shalt not" type laws, that's fine. He can criticize others for not following the same principles. But calling a bunch of top graphics engineers "idiots" because they looked at a vastly different engineering problem with different priorities and arrived at a different design is rude and ignorant and it reflects poorly on JWZ.
JWZ makes this statement: "Your users have code that works."
He is simply wrong about this.
* No one had working OpenGL ES code before OpenGL ES was standardized. This is by definition and one cannot argue the definition of OpenGL ES with the OpenGL standardization body itself.
* Even if you wanted to accept the mistake of thinking of the existing OpenGL 1.x codebase was supposed to be forwards compatible with ES, it's not true in the main. The amount of existing OpenGL 1.x that could plausibly benefit from being ported to embedded devices is insignificant. Seriously, JWZ may have just ported most of it.
This is what I mean by "X screensaver project is actually not an overriding concern driving the evolution of OpenGL ES."
JWZ seems to think that his principles of software engineering are the only correct way to look at it. He goes so far as to say "If you don't agree with that, then please, get out of the software industry right now. Find another line of work. Please."
To support such absolute claims and broad sweeping statements he uses a toy porting project that takes three days. The vendors who participate in the OpenGL ARB are concerned with projects that take 3 years and APIs that persist for more than 20! Don't you think they actually might know a thing or two about APIs and engineering them for software? Don't you think they might know extremely well what the costs of failed backwards compatibility are?
But that's OK, everybody scratches their head for a bit trying to sort out the different flavors of graphics APIs. Even single-vendor Direc3D has similar issues. If this is the most confusing thing about OpenGL to him and he can do something useful with OpenGL ES in his first three days of messing with it, he is a really really smart guy.
It showed that some existing code with a shim containing a reimplementation of a small subset of OpenGL 1.3 could be made to run acceptably fast on a rather beefy example of 2012's mobile hardware.
It certainly did not show that there was no need to exclude those calls back in 2003 when they were originally not included in OpenGL ES.
Yet another incomplete ad-hoc extended subset of OpenGL 1.x functionality lacking documentation, regression and performance tests, a stable and committed team of maintainers, ...
That is a noble goal, but it's one of hundreds of often-conflicting noble goals. It's not inherently wrong to design a toaster that fails to work as a refrigerator.
But if we compare the massive number of newly written OpenGL ES applications to all the old OpenGL 1.x fixed pipeline apps, the latter seem insignificant.
As he so ably demonstrates, it's just not that hard to port the older apps either. This "All you engineers are idiots because I had to work THREE WHOLE DAYS to port this 20 year old code to an iPhone" just sounds childish and silly.
The OpenGL board made the right decision for ES.