SIGGRAPH 2012 #1: OpenGL 4.3 compute shaders to run simulation code in the graphics pipeline

Published 06 August 2012

Posted by greg corke

Article tagged with: opencl, opengl, directx, siggraph 2012, khronos group, 3d graphics

With the introduction of compute shaders to OpenGL 4.3 at SIGGRAPH 2012 today, Neil Trevett, president of the Khronos Group, believes the cross-platform graphics API is now more advanced than Microsoft DirectX.

“[With] compute shaders this is the last gap that we’ve had versus DirectX and, now that’s filled we are [OpenGL 4.3 is] genuinely a superset of DirectX 11 functionality,” he says.

OpenGL is used to deliver 3D graphics in most CAD/CAM/CAE applications on Windows, Linux and Mac OS X, whereas Microsoft DirectX is Windows only and is used in a handful of CAD applications, including Autodesk Inventor.

The ‘ARB_compute_shader’ is a new shader type for OpenGL that enables software developers to write shaders that don’t necessarily have to have anything to do with the graphics pipeline. In the context of a CAD application, this could be for simulation or rendering (ray tracing or global illumination), for example.

“If you’re running a graphics application and you’re running OpenGL and you just want to do some compute within the context of the graphics pipeline, it’s much easier to use compute shaders rather than firing up another whole API and figuring out how to interoperate,” says Trevett.

The OpenGL compute shader is not designed to replace APIs like OpenCL, which has the advantage of being able to run on CPUs, GPUs and other processors.

“OpenCL is designed for large, standalone compute applications,” explains Trevett. “OpenGL shaders are designed for smaller amounts of compute that you can express in a GLSL shader but want to interoperate with the rest of the GL pipeline. Quite different use cases.”

Most CAD applications use OpenGL 3.0 or below for 3D graphics, so it will take a while for this new OpenGL technology to trickle through to commercial software.

There have also been some developments to OpenCL that make it easier to develop OpenCL applications using a new Open Source API for OpenCL Prototyping called CLU. According to Trevett, CLU should help reduce the time it takes programmers to develop their first OpenCL application from two days to an hour.

Meanwhile, the Khronos Group has also released details of OpenGL ES 3.0, the 3D API used throughout the mobile industry, especially on Android and iOS. Trevett explains how this new version is a true subset of OpenGL 4.3, continuing a trend for a convergence of the two APIs. As part of this development, the Khronos Group also announced a new texture compression technology that is available to both OpenGL 4.3 and OpenGL ES 3.0 programmers.


No comments have been made on this article yet.

Leave a comment

Enter the word you see below: