News for hackers. Stuff that matters.
Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by maaaats on Wednesday July 24, 2013 @06:30AM (#6095329)
A question: Why are this and the standard WebGL both based on OpenGL ES, and not OpenGL?
Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by aras_p on Wednesday July 24, 2013 @07:54AM (#6095591)
Several reasons, I guess. OpenGL ES 2.0 (which WebGL 1.x is based on) is a subset of OpenGL 2.x, without a lot of legacy stuff that made sense in 1997 but not so much in 2012.

In a way, using GLES2.0 is much nicer and more streamlined than "desktop GL 2.x".

Also, until very recently GLES2.0 had a "conformance tests" suite to check implementations for conformance, whereas desktop GL did not. Desktop GL only got the conformance suite about right now (siggraph 2013), starting with OpenGL 4.4.

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by hosay123 on Wednesday July 24, 2013 @06:33AM (#6095346)
ES is much more rigorously specified AFAIK, and has good mobile support.. OpenGL proper is a random extension soup.
Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by piranha on Wednesday July 24, 2013 @09:17AM (#6095981)
Some time ago jwz wrote an article open OpenGL ES: http://www.jwz.org/blog/2012/06/i-have-ported-xscreensaver-t...

He didn't like it that much.

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by masklinn on Wednesday July 24, 2013 @10:12AM (#6096259)
He didn't like it much because, amongst other things, OpenGL ES removes (completely) a number of older OpenGL features. Features which he was using in xscreensaver.

If you're not porting OpenGL 1.x software (and thus not using APIs long considered deprecated/to avoid) there's no big issue with OpenGL ES as far as I know.

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by belandrew on Wednesday July 24, 2013 @06:44AM (#6095368)
ES is a subset of OpenGL for embedded systems since it requires less die space on the hardware and is lighter on the software side as well. Anything that runs on ES should also run on standard OpenGL implementations but the reverse is not true.

ES is supported on mobile phones and tablets, like Android and IOS, where people would obviously like browser support. If they used full OpenGL, they would lose out on those markets.

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by masklinn on Wednesday July 24, 2013 @10:16AM (#6096281)
> Anything that runs on ES should also run on standard OpenGL implementations but the reverse is not true.

Not exactly true, AFAIK, OpenGL 4.1 was the first "full" OpenGL version which was fully API-compatible with ES (2.0, you need OpenGL 4.3 for ES 3.0 API-compatibility).

IIRC, none of the OpenGL versions prior to 4.1 were complete supersets of OpenGL ES.

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by bryanlarsen on Wednesday July 24, 2013 @08:55AM (#6095874)
It's my impression that OpenGL ES is basically OpenGL without a bunch of backwards compatibility crap that no modern program uses.
Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by zackmorris on Wednesday July 24, 2013 @10:33AM (#6096378)
OpenGL ES was a way to pass the buck to developers so companies could save money. Since the OpenGL fixed function pipeline could have been implemented to some degree above OpenGL ES (but never was), it forced developers to learn the entirety of rendering from modelview projection matrices, to setting up render buffers, to compiling shaders, and so on and so forth. The small one-page examples that made OpenGL great are now project downloads and video tutorials and blog posts full of errata and workarounds. To me, something of great value was lost in the transition, probably forever.

What I see now are the great failures of OpenGL ES. Having to specify line widths in the shader. Inconsistent support for points. Not being able to predict if a shader will have one instruction too many and fall off the fast path. I've learned it to great depths but the mental pollution I had to absorb in the process has caused lasting damage in the form of resentment and exhaustion.

If it was up to me, I would scrap the whole thing and just give developers full DSPs so they can write their own renderer in a language like a hybrid between Go and Matlab, but with exact specifications and basic hardware guarantees.

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by masklinn on Wednesday July 24, 2013 @11:24AM (#6096685)
> OpenGL ES was a way to pass the buck to developers so companies could save money. Since the OpenGL fixed function pipeline could have been implemented to some degree above OpenGL ES (but never was)

Wasn't the fixed-function pipeline in OpenGL ES 1, and removed from 2.0 following the OpenGL 3.0 -> 3.1 transition?

Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by zackmorris on Wednesday July 24, 2013 @12:16PM (#6097036)
Ya you are right. I was startled to see I got down voted for my comment, but realized that there is quite a bit of context I skipped over. I've rewritten things for OpenGL 3 times now: once for Mac OS, once for iOS ES1 and once for iOS ES2. Then I scrapped it all and wrote some small wrappers so I could use the same code between iOS and Mac OS. We have everything defined in macros, for example MY_glGenFramebuffers() to map similar code to glGenFramebuffers() and glGenFramebuffersOES(). Unfortunately there are some iOS-specific calls that tie a render buffer's backing store to a UIView's memory so it's difficult to make a perfect wrapper. It feels like most of my day to day work now is just slogging through subtle issues with render and stencil buffers, and tweaking the shaders to even get 15 fps on older iOS devices. I get very little "actual work" done on any given day with OpenGL anymore. I don't think that it's gone the direction that it was originally intended to go. I just mean, I think OpenGL started with a scientific or mathematical approach and it's become kind of a catch-all or least common denominator for wherever the industry is going. So for example you really have to use one giant texture and one shader to do all of your work, because context switches are incredibly expensive on iOS. This doesn't make sense to me though because reading from a different texture address should be practically a free operation. My hunch is that they left off some critical piece of hardware, maybe a memory controller, or they didn't write a very good driver, so changing textures or shaders has to move a lot of data in and out of registers. I realize this is for cell phones and the hardware really is puny, but I don't think it would have been that expensive to give the hardware/drivers just that little bit of extra power to take the burden off developers. So that's what I meant about passing the buck. It's hard to explain my reasoning for all of this so I guess I came across as trollish.
Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by btian on Wednesday July 24, 2013 @10:11AM (#6096254)
What?! Fixed function rendering pipeline continues to be fairly widely used because it's easier to develop. While I agree that modern programmable pipeline has its advantages, but backwards compatibility is crap? Why?
Re:Mozilla’s WebGL2: an experimental WebGL implementation ba... by btian on Wednesday July 24, 2013 @10:13AM (#6096262)
Compatibility. Every device that supports OpenGL also supports OpenGL ES, but not vice versa.