O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Offscreen rendering

Sometimes, it is useful to render an OpenGL scene not to the screen but to some image that can be later processed externally or used as a texture in some other part of rendering. For that, the concept of Framebuffer Objects (FBO) was created. An FBO is a rendering surface that behaves like the regular device frame buffer, with the only exception that the resulting pixels do not land on the screen. An FBO target can be bound as a texture in an existing scene or dumped as an image to regular computer memory. In Qt, such an entity is represented by a QOpenGLFramebufferObject class.

Once you have a current OpenGL context, you can create an instance of QOpenGLFramebufferObject, using one of the available constructors. A mandatory ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required