-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
OpenSceneGraph 3.0: Beginner's Guide
Before starting to explain how to handle rendering order in OSG, we'd better understand what rendering order is and how it works in OpenGL.
OpenGL stores vertex and primitive data in various buffers, such as the color buffer, depth buffer, stencil buffer, and so on. Apart from this, it doesn't record vertices and triangles already sent to it in any other form. Therefore, OpenGL always renders new geometry primitives regardless of tracing old ones, which means that the order in which these primitives are rendered is significant.
With the help of depth buffer, opaque objects can be rendered correctly and the rendering order of these objects doesn't matter in simple cases, because the default depth test passes the incoming data if this is less than the stored one.
However, when using the OpenGL blending mechanism, for instance, to implement transparent and translucent effects, a special operation will be performed in order to update the color buffer. Instead of just overriding...
Change the font size
Change margin width
Change background colour