What’s New in OpenGL ES 3.0

In conjunction with next-generation GPUs, OpenGL ES 3.0 will make a number of new features available to mobile and embedded devices. In terms of functionality, OpenGL ES 3.0 is largely a mobile implementation of the OpenGL 3.3 feature set, with a couple notable features missing and a few additional features plucked from later revisions of OpenGL. In terms of backwards compatibility only OpenGL 4.3 is a complete superset of OpenGL ES 3.0, but for most purposes OpenGL 3.1 is probably the closest desktop OpenGL specification.

On that note, though drawing a comparison to Direct3D isn’t particularly straightforward, since we get asked about it so much we’ll try to answer it. Direct3D of course had a major reachitecting with Direct3D 10 back in 2007, which added a number of features to the API  while giving Microsoft a chance to clean out a great deal of fixed-function legacy cruft. From a major feature perspective OpenGL did not reach parity with Direct3D 10 until OpenGL 3.2, which among other things introduced geometry shader support.

So if we had to place OpenGL ES 3.0 along a Direct3D continuum, as it’s primarily based on OpenGL 3.1, it would be somewhere between Direct3D feature level 9_3 and feature level 10_0, again primarily due to a lack of geometry shaders. Consequently, this is why some mobile GPUs like Adreno 320 can support OpenGL ES 3.0, but not D3D feature level 10_0. If you only implement the baseline OpenGL ES 3.0 feature set, then it won’t be enough for D3D 10_0 compliance.

Strictly Defined Pixel/Uniform/Frame Buffer Objects

The first major addition to OpenGL ES 3.0 is support for a number of buffer formats, alongside a general tightening up of the buffer format specifications. OpenGL ES 2.0’s buffer format specification had some ambiguity, which lead to GPU vendors sometimes implementing the same buffer format in slightly different ways, which in turn could lead to problems for developers.

OpenGL ES 3.0 also adds support for Uniform Buffer Objects, which is a useful and efficient data buffer type for use with shaders.

GLSL ES 3.0

As is common with most OpenGL releases, OpenGL ES 3.0 includes a new version of the GL ES Shading Langauge, used to program shader effects. The primary addition for GLSL ES 3.0 is full support for 32bit integer and 32bit floating point (i.e. full precision) data types and operations.  Previously only lower precisions were supported, which are easier to compute (it takes less hardware and less memory), but as shader complexity increases the relatively large precision errors become even larger.

GLSL ES 3.0 has also seen some syntax and feature tweaks to make it more like desktop OpenGL. This doesn’t change the fact that only OpenGL 4.3 is a complete superset of OpenGL ES 3.0, but it makes it easier for developers used to desktop GLSL to work on GLSL ES and vice versa.

Occlusion Queries and Geometry Instancing

While OpenGL ES 3.0 doesn’t get geometry shaders, it does get several features to help with geometry in general. Chief among these are the addition of occlusion queries and geometry instancing. Occlusion queries allows for fast hardware testing of whether an object’s pixels are blocking (occluding) another object, which is helpful for quickly figuring out whether something can be skipped because it’s occluded. Meanwhile geometry instancing allows the hardware to draw the same object multiple times while only requiring the complete object to be submitted to the rendering pipeline once. This makes trees and other common objects easier for the CPU to set up as it doesn’t need to keep resubmitting the entire object in different locations.

Numerous Texture Features

OpenGL ES 3.0 adds support for a number of texture features; in fact it’s far too many to break down. The big additions are support for floating point textures (to go with the aforementioned FP32 support), 3D textures, depth textures, non-power-of-two textures, and 1 & 2 channel textures (R & R/G).

Multiple Render Targets

Multiple Render Target support allows the GPU to render to multiple textures at once. Simply put, the significance of this feature is that it’s necessary for practical real-time deferred rendering.

MSAA Render To Texture

When rendering to a texture, special consideration must be taken for anti-aliasing, which on earlier hardware generations is only available when run against the framebuffer. OpenGL ES 3.0 will add support for MSAA’d rendering to a texture.

Standardized Texture Compression Format: ETC

Wrapping up our look at OpenGL ES 3.0’s features, we have texture compression. One of the big problems for OpenGL for a number of years was that it didn’t have a standardized texture compression format. In the desktop space the earliest and most common texture compression format is S3TC, which is not available royalty-free, and as such cannot be a part of the core standard (instead only available as an extension). This is a problem that carried over to OpenGL ES, which led to vendors implementing their own incompatible texture compression standards. Among the major OpenGL ES GPUs, S3TC, PVRTC, ETC, and ATITC are the most common texture compression formats.

Because there isn’t a standard texture compression format in OpenGL ES 2.0, developers have to pack their textures multiple times for different hardware, which takes up time and more importantly space. This is a particular problem for Android developers since the platform supports multiple GPUs (versus the PowerVR-only iOS).

For OpenGL ES 3.0, Ericsson has offered up their ETC family of texture compression algorithms on a royalty free basis, allowing Khronos to implement a standard texture compression format and thereby over time resolving the issue of having multiple texture compression formats. Compared to where Khronos eventually wants to go ETC is somewhat dated at this point in time – it only offers 6:1 compression for RGB and 4:1 compression for RGBA – but it will get the job done for now.

For Khronos this is a huge breakthrough since texture compression is even more important on mobile devices than it is desktops, due to the much tighter memory bandwidth requirements. This also allows Khronos to evangelize texture compression to developers who had previously been shying away from using texture compression because of the aforementioned issues.

At the same time it will be interesting to see how developers adopt ETC. Just because it’s a standard doesn’t mean it has to be used, and while we can’t imagine Android developers not using it once OpenGL ES 3.0 is the baseline for applications, Apple bears keeping an eye on. As a PowerVR-only shop they have used PVRTC since day one, and so long as they don’t change to another brand of GPUs they wouldn’t need to actually back ETC.

Of course ETC isn’t the only texture compression format in the pipeline. Khronos is also working on the very interesting ASTC, which we’ll get to in a bit.

Introduction OpenGL 4.3 Specification Also Released
POST A COMMENT

46 Comments

View All Comments

  • BenchPress - Monday, August 06, 2012 - link

    S3TC support is not demanded. You can query which formats are supported, and trying to create unsupported ones will fail.

    Of course texture compression is important so the major hardware manufacturers implemented it and pay for it. But this is equally true for OpenGL. They all implement the extension.

    Core Direct3D functionality is royalty free, just like OpenGL. After all, they are just APIs.
    Reply
  • mczak - Monday, August 06, 2012 - link

    That isn't quite true for DX10 and up. There's very few optional formats, almost everything is mandatory (including the s3tc formats).
    That said, IIRC hw manufacturers did NOT have to pay s3tc license fees due to some licensing deal of MS (if they implemented s3tc for d3d, they still had to pay for OGL).
    Reply
  • StevoLincolnite - Monday, August 06, 2012 - link

    Direct X is also used on the Xbox 360 which is a games console, the PS3 even has Direct X 9 hardware, albeit without the API. (It uses OpenGL)
    Android, iOS and other mobile OS's can't play AAA games like a PC or Console can, in-fact most games are incredibly simple with decade old level of graphics.

    Steam has what, 30-40 million users? Origin is picking up steam (Pun intended), Ubisoft uPlay probably has a few users.

    So lets go with 40 million PC gamers (Which is probably lower than the true number.) which in turn use Direct X.
    Then add on the Xbox console numbers which makes it 110 million gamers that use Direct X in one form of another.

    Suddenly Direct X doesn't look insignificant.

    If you go back almost a couple decades during the Era of 3dfx, Allot of games actually used multiple API's that you could choose depending on your hardware.
    I remember Unreal Tournament for instance coming with 3dfx Glide, OpenGL, Software Rendering and Direct 3D, so it's not like you can't support multiple API's in a game engine using some wrappers, which may be the path developers may take in the future again.
    Reply
  • BiggieShady - Monday, August 06, 2012 - link

    Saying things like "PS3 has DX9 hardware but it uses OpenGL" is wrong on so many levels. DirectX and OpenGL are API-s designed to work with different types of hardware with one thing in common - they expose the same hardware functionality. So PS3 and Xbox have different GPU-s that both expose same functionality either for OpenGL or DirectX. Reply
  • wicketr - Monday, August 06, 2012 - link

    There are over 500 Million Mac/Linux/Smartphone/Tablet users that DirectX isn't on. Meaning that a developer using DirectX would miss out on those users.

    ....Or they could use OpenGL and cover 100% of the user base. Currently, it'd be asinine to develop a mobile only game in DirectX, because they'd only reach about 5% of the market.

    The question on the desktop is if DirectX's feature set is THAT much better than OpenGL to warrant it's use. As OpenGL catches up in parity and as more users abandon Windows, the reasoning for using DirectX gets smaller and smaller, especially as developers get more and more comfortable in OpenGL (due to mobile programming).

    The only way DirectX can really survive over the long term (10+ years out), is if Microsoft develops engines compatible for iPhone and Android. Those ecosystems are just WAY to large for Microsoft to use their proprietary engine to push users (and developers) to MS Phones.
    Reply
  • bobvodka - Monday, August 06, 2012 - link

    DX will survive as long as there is a Windows or XBox market for it to survive in.

    Beyond that developers, like myself, will do what we've always done and use the best API for the target platform.

    Amusingly the only people who really seem to care about which API 'wins' are OS Zealots who want their OS to dominate the world... which, you know, works so well...

    The rest of us doing the real work day in-day out will just use the best tools for the job and won't care who they come from.

    Unfortunately, right now, the ARB doesn't have a track record of 'the best tools' having dropped the ball with the Longs Peak/OGL3.0 debarcle which was, at the time, OpenGL's best chance of 'making a come back' on Windows (this was around the time of Vista/DX10 and the wailing of XP gamers who wanted DX10 features in their games) - when it comes to OpenGL I wouldn't trust the ARB to find their own arses if handed a map.

    Now, OpenGL|ES is another matter, they have handle that well and its a good thing BUT OpenGL|ES is NOT OpenGL (yay marketing!); you do not program these APIs the same way and doing so is going to hurt you which brings us back around to 'the right tools for the job'.

    OpenGL is not, for the majority of the home computer market, the right tool yet.
    Reply
  • ananduser - Tuesday, August 07, 2012 - link

    The user to which you replied presented some vague numbers representing dedicated gamers and not the install base. You counter that with the totality of non-Win devices ?

    You seem bent on people "abandoning" Windows like it's the plague and it's the right thing to do. You also seem to go to sleep at night wishing DirectX was dead so that EA would develop BF4 for your mac(I presume).

    DX will still be the dominant gaming industry API even 10 years out. Even more so than today.
    Reply
  • SleepyFE - Monday, August 06, 2012 - link

    DirectX is being used because people think like you (and so far it was better). Most people use Windows so why not use DirectX. NOW you have 110 mill gamers using DirectX because developers used it. If they decided to use OpenGL which also works on Windows and Xbox you would have 110 mill gamers using OpenGL and a few million using DirectX because Microsoft was the developer's partner and they forced them to use it.

    So far using OpenGL was a problem since it had less features and was harder to learn (deep end of the pool). Now is the time to make the switch.

    Also, i do not use Windows because i like it, i like the games that are made for it. If i want to play a game, i am FORCED to have Windows because of DirectX only running on Windows. Using OpenGL does not yet mean it will run everywhere, but it does mean a lot less work to get it working elsewhere. Right now so many people are on Windows that developing the game in both DirectX and OpenGL just doesn't pay. Using only one is the way to go. An OpenGL title right now has a slightly wider audience (a very very very very small increase). But if they keep using DirectX we have to keep using Windows (even if we don't like it).

    Games are the reason most of us use Windows, but with good OpanGL that might change. Ouya is a gaming console with Android and as phones become more and more powerful we might only need a phone some day. A phone with a super fast USB 5.0 that is plugged in to a monitor with more USB ports for a keyboard, mouse, controller... And that phone will probably have Android on it. And to play games you will need OpanGL. At that point it would be good to have a huge selection of games (even if they are old and outdated, nostalgia never goes out of fashion).
    Reply
  • bobvodka - Monday, August 06, 2012 - link

    The PS3 does not use OpenGL.

    There is a PSGL implimentation but no one who wants any speed out of the thing uses it; GCM is the PS3 API of choice.

    Linux and OSX are the only OSes which use OpenGL exclusively.

    Mobile devices use OpenGL|ES which is a different API completely and, more importantly, can not be used in the same manner as OpenGL. They are moving closer in feature parity however even then I would call anyone who treated a mobile device like a desktop insane.

    Developers also regularly support multi rendering APIs when they produce 360, PS3 and PC titles; right now we (where I work) are producing a game which has support for X360, PS3, D3D11 and early WiiU support.

    In the future, for a short while at least until we can drop it for the older platforms anyway, I suspect we'll have X360, PS3, D3D11, XBox720, PS4, WiiU and iOS support in the renderer (maybe Android too, although I know of no plans personally) - as always we will pick the best API for the platform.
    Reply
  • wicketr - Monday, August 06, 2012 - link

    The question is what API are you using for Mac users? They are 10% of desktop users, and significantly more than that if you discount the business segment of computers. Surely you're not ignoring a fourth (and growing) of the consumer desktop/laptop market by not even writing your game for Macs.

    If it's OpenGL, then wouldn't it be a greater benefit to "write once, deploy twice" on both OSes? Or are the graphical benefits of DirectX really that much better to write it twice?
    Reply

Log in

Don't have an account? Sign up now