Skip to content

Refactor Your OpenGL Legacy With Style Kevin Ottens

Using OpenGL code with Qt is a long love story… long enough that there might be skeletons in the closet. Indeed, the OpenGL code of your Qt application could have been written before the modernization of the OpenGL API to exploit better GPUs. In this talk, we will walk through a technique to help refactor your old OpenGL code in the safest way possible and get it ready for the 21st century.

We can find plenty of existing OpenGL code in the wild, some of it is rather old. Unfortunately due to the radical changes in GPU architecture, OpenGL had to adapt as well, with more modern, better suited APIs. In turn, it pushed forward very different designs for rendering code.

Because of those technical changes, it can be very challenging to refactor legacy OpenGL code to prepare a port to Modern OpenGL APIs. In particular because such code tends to have close to no automated test coverage. What can we do with all that code? It could be tempting to start from scratch, but there is a clear chance to break the rendering in some subtle ways.

In this live coding session, we’ll see how we can start from an untested Qt and OpenGL legacy code base, add new features to it, and move it over Modern OpenGL in less than an hour.

It will be a good way to discover how refactoring and pin testing techniques can be used even for your purely graphics code. All of that in a suboptimal codebase and while doing the simplest things that will work.

This talk will be interesting to any developer having to deal with legacy untested OpenGL code or those wanting to modernise for performance or new features. But, if you are interested in testing techniques for rendering code in general or attended one of the previous GildedRose sessions held at Akademy or Qt Dev Days, there will be nice advice for you as well.

Categories: OpenGL / Presentation videos / Qt

Leave a Reply

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close