-
Book Overview & Buying
-
Table Of Contents
OpenSceneGraph 3.0: Beginner's Guide
A concern is how to get the rendered frame buffer image into the texture object. A direct approach is to use the glReadPixels() method to return pixel data from the frame buffer, and apply the result to a glTexImage*() method. This is easy to conceptualize and use, but will always copy data to the texture object, which is extremely slow.
The glCopyTexSubImage() method would be better in terms of improving the efficiency. However, we can still optimize the process. Rendering the scene directly to a target other than the frame buffer is a good idea. There are mainly two solutions for this:
The pixel buffer (pbuffer for short) extension can create an invisible rendering buffer with a pixel format descriptor, which is equivalent to a window. It should be destroyed after being used, as is done for the rendering window.
The frame buffer object (FBO for short), which is sometimes better than pixel buffer in saving the storage space, can add application-created...
Change the font size
Change margin width
Change background colour