I lately tried to implement an Plasma Amarok Applet that has an OpenGL Widget inside of it. One would think this is a rather easy task since all this new and fancy KDE Plasma stuff smells a lot like OpenGL. Sadly not by a long shot. Implementing an OpenGL Plasma widget normally works this way: create a widget, set the Viewport of the Graphics view to an new QGLWidget and you got it. This approach has 2 Downsides though: first of all if you Viewport is an QGLWidget all you drawing will be rendered via OpenGL. And not only on this applet but on all Applets that share this widget. One might think this is no Problem. But OpenGL handles a lot of stuff quite different then the Qt Implementations of the Graphics Objects. For starters colors. The same color values won’t give you the same output if one is rendered by OpenGL and the others by Qt. So you get strange colors all over the place (and not only in this particular applet but in all the others, because all Amarok Applets share one Viewport). The second problem with this approach is that it will make rendering of non OpenGL stuff and OpenGL stuff at the same time quite hard. You’ve got to watch out for what you’re painting when and in what order and a lot of OpenGL functionality will have to be left untouched because it would mess with you Non OpenGL windows etc. As you might have guessed this was not an acceptable solution. All other approaches I made (render into the QGLWidget and get the Framebuffer from there for example) ended in either an empty Widget or a separate window for my OpenGL stuff. Googleing my ass of and tyrannizing a lot of nice people on IRC finally got me the “right” answer to my problem: I had to render all the OpenGL stuff into a QGLPixelBuffer and then paint this buffer onto the Widget with all the other Graphics Objects. Insane? Definitely! But it works like a charm. And know what? Its quite fast and reliable. I even got it to paint either to a separate Window, the Widget or even fullscreen just by clicking a button. Looks like we’re living in an insane world after all :-P.