Friday 12 March 2010

OpenGL 4 spec arrives with Direct3D 11 feature parity

At GDC the Khronos Group announced not one but two new OpenGL specifications. The headline release, OpenGL 4, includes a raft of new features bringing OpenGL in line with Microsoft's Direct3D specification. OpenGL 3.3 was also released, providing as many of the new version 4 features as possible to older hardware.

The Khronos Group, the consortium of hardware and software companies that governs OpenGL, OpenCL, and other related specifications, made no bones about its intentions for OpenGL 4: providing standardized support for Direct3D 11 features to OpenGL developers was the prime concern. Direct3D 11 integrated two key features into the graphics pipeline: hardware tessellation and compute shaders. The former allows the video card to synthesize polygons programmatically, enabling considerably smoother, more natural looking curved surfaces. The latter is a key part in the development of using the GPU for general-purpose computation (GPGPU)—not just for producing graphics, but for performing various kinds of high-performance math.

Direct3D 11 mandated support for complex programmable tessellation and compute shader integration. Although Khronos' OpenCL specification provides a general API for GPGPU programming, this didn't have the same integration into the graphics pipeline. With OpenGL 4, both of these deficits (relative to Direct3D 11) are rectified.

As well as these big-ticket items, the new specification provides support for new data formats improving rendering accuracy and computational precision.

The new specification remains an evolution of the previous OpenGL 3 specification. More radical changes, of the kind initially proposed for OpenGL 3 but later abandoned, are still nowhere to be found. The initial plans for OpenGL 3 were to create a new object-oriented API that was, again, closer in concept to Direct3D; this was welcomed by game developers but rejected by visualization and CAD developers due to its lack of backwards compatibility. After considerable efforts to develop such an API, the Khronos Group did an abrupt about turn in favor of a more conservative evolution of the API, and this conservative approach is still apparent in version 4. Revolutionary change is clearly not in the cards.

The overall tone from Khronos makes clear that it's Direct3D that sets the standard for what features video hardware supports. The group promotes OpenGL's platform-independence, in contrast to Direct3D's Windows-specificity. But even that benefit is diluted somewhat; though OpenGL is a fundamental technology to MacOS X's graphical stack, Apple hasn't offered full OpenGL 3 support on its latest operating system, instead sticking to version 2.1 with a few extensions.

NVIDIA promises OpenGL 4 support will coincide with the launch of its new Fermi GPUs later this month. ATI/AMD has made no specific commitment, but support is likely to come sooner rather than later.