OpenGL 4.1
Written by David Conrad   
Tuesday, 27 July 2010

OpenGL 4.1 takes on DirectX. As Microsoft struggles to find a coherent way of bringing 3D to the web, OpenGL just gets on with the job.



A new decimal point upgrade of OpenGL - OpenGL 4.1 - signals a revival in the 3D framework's fortunes. This is the sixth update in two years which indicates the renewed energy in the OpenGL development camp.




OpenGL is becoming increasingly important as it powers 3D graphics on mobile phones and web pages. On the desktop OpenGL has suffered from being an also-ran compared to the all encompassing DirectX under Windows.

However, OpenGL has always had one huge advantage in being platform independent - it runs under Windows, Mac OS X, Linux, and most flavours of Unix, not to mention many games consoles. If you create an app using DirextX then you have targeted Windows but if you opt for OpenGL you can in theory run your creation almost anywhere.

Now, in addition to the traditional platforms running full OpenGL, we have OpenGL ES which provides reduced 3D support on iOS 4 (iPhone, iPad) and the latest Android OS.

Add this to the fact that OpenGL is the core technology behind WebGL which adds 3D to the HTML5 Canvas object, and you can appreciate that covers most platforms and uses.

The latest release has full compatibility with OpenGL ES 2.0,  a feature that should make it easier to port applications from the desktop to mobile devices - although of course there are many other issues than 3D in moving from the desktop to a mobile device. It is, however, clear from the emphasis placed both on the backward compatibility of the new release and its OpenGL compatibility that its new role and importance is well understood.

Other improvements are mostly aimed at GPU use. For example, you can now load precompiled shaders from disk rather than having to create them on the fly. Separation of fragment and vertex shaders is a logical step bringing OpenGL in line with DirectX and shaders can now use 64-bit precision. Support for OpenCL has also been improved which isn't really suprising as the same organisation, Khronos, is responsible for both open source projects.

The Microsoft factor

The biggest problem for OpenGL is Microsoft - but Microsoft aren't doing a good job of promoting DirectX either.

Although the OpenGL library is included with all versions of Windows it generally runs without hardware acceleration unless the user is smart enough to know how to install OpenGL device drivers for their graphics hardware. As a result OpenGL generally reverts to either version 1.1. or 1.4. Under Vista and Windows 7 OpenGL runs under a DirectX wrapper which provides some hardware acceleration but it is still slower than the native hardware acceleration provided by an OpenGL driver.

When if comes to the adoption of the OpenGL based WebGL all the major browser developers are backing it - with the exception of Microsoft.

It is clear that the OpenGL community see DirectX as being its major competitor but this doesn't mean that Microsoft is handling things correctly. DirectX used to be a frontline API that interested programmers who weren't primarily interested in high performance 3D. The release of a new version of DirectX was an event and always seemed like a powerhouse of innovation as it rolled up ever more technologies into its "Direct" brand. Now DirectX is marginalised as far as the average programmer is concerned into XNA and the modest support 3D has within WPF.

If you are programming in a managed language such as C# then OpenGL is actually easier to use via its traditional DLL function calls than DirectX with its arcane and under-supported COM interfaces.

As to a web presence, currently Silverlight isn't DirectX based and doesn't support 3D. Given that Silverlight has to be cross platform and DirectX is very much Windows based it is difficult to see how Microsoft can put together a 3D web facility within Silverlight or Explorer. In fact it would be easier for it to adopt OpenGL than build something based on DirectX.

The one exception to this tale of woe is Windows Phone 7. By insisting on a DirectX compatible GPU Phone 7 can support XNA and true 3D. However even here there are problems in melding together the non-DirectX Silverlight development environment with the DirectX provided 3D. At the moment you can either have a Silverlight application or an XNA application but you can't mix them.




The bottom line is that Microsoft has neglected DirectX, neglected the developers who might use it, and they don't have a strategy for 3D on the web.

This leaves a lot of territory wide open for OpenGL.

Further reading

Graphics Accelerators

OpenGL Shading Language

Fundamentals of Computer Graphics

OpenGL Programming Guide



$1 Million SOS Rewards Pilot Program

With Google sponsorship, the Linux Foundation has launched the Secure Open Source Rewards pilot program to incentivize improvements that proactively harden critical open source projects and their supp [ ... ]

Visual Studio 2022 Preview 4 - More Productivity

Visual Studio 2022 Preview 4 has been released with more support for personal and team productivity, along with support for 'modern development' according to the Visual Studio team.

More News








Last Updated ( Tuesday, 27 July 2010 )