WebGL and Hardware acceleration
Friday, March 11, 2011 9:51:49 PM
The first week of March was a busy one for me. I started with releasing a Windows-only public preview build of what I have been working on in Opera lately, WebGL and hardware acceleration. A few hours later I got on a plane to San Francisco to attend GDC and give a presentation about WebGL in Opera at the WebGL 1.0 specification announcement.
Hardware acceleration is something I have been working on on and off for a long time now. I actually had a hardware accelerated renderer in Opera up and running in 2004. That renderer was based on an older graphics library used in most non-desktop versions of Opera before Vega. Since we already knew we would have to replace it with Vega in the near future we never spent time finishing that implementation, but some parts of it are actually used in the new hardware accelerated renderer.
My next hardware accelerated renderer in Opera was up and running in 2008, and we posted a video of it. That renderer was an early version of what we have now released a public preview of. I did not work on it full time since 2008, we decided to focus on getting the software backend - used as fallback when hardware acceleration is not available - as fast as we could first. I also did not do anything related to hardware acceleration when I worked with the desktop team making Opera 10.50, but after that was released I came back to doing hardware acceleration again.
Parallel with the hardware acceleration work I have also been working on WebGL. I have both been working on the specification and the implementation in Opera. At the moment the WebGL build of Opera only use the OpenGL backend, which means you have to have up to date drivers from the graphics card manufacturer in order to use it. This limitation applies to both WebGL and the hardware acceleration. We are working on a Direct3D backend (two actually, D3D 9 and D3D 10) which will make it easier to find working drivers on Windows. The WebGL implementation is not complete yet, but it is passing most of the conformance tests and many demos already work well.
The presentation given at GDC was an update of the status of WebGL in Opera. After the status update I showed a demo I have been helping a colleague developing. The demo is a preview of a larger demo and an article on how to develop high quality WebGL content. The article and demo will be released at dev.opera.com when it is finished. Embedded here is a video of the demo.
Some of the techniques used in the demo are:
- Content imported from Maya
- Hardware skinning
- Shadow mapping
- CSS based fullscreen mode