- OpenSceneGraph 3.0: Beginner's Guide
- Rui Wang Xuelei Qian
- 192字
- 2021-03-27 00:35:44
Chapter 4. Building Geometry Models
The basic operation of OpenGL's graphical pipeline is to accept vertex data (points, lines, triangles, and polygons) and pixel data (graphical image data), convert them into fragments and store them in the frame buffer. The frame buffer serves as a major interface between developers and the computer display, which maps each frame of graphic contents into memory space for read-write operation. OSG encapsulates the whole OpenGL vertex transformation and primitive assembly operations in order to manage and send vertex data to the OpenGL pipeline, as well as some data transmission optimizations and additional polygonal techniques for improving rendering performance.
In this chapter, we just focus on how to draw and render geometry models through a fast path, and will cover the following topics:
- How to quickly draw basic objects with a few necessary parameters
- How to set vertices and vertex attribute arrays to construct a geometry object
- The reason and methods of indexing vertex data with primitives
- How to make use of different polygon techniques to optimize rendering
- How to get access to geometry attributes and primitives
- Integrate OpenGL drawing calls into your OSG-based applications