1vbo_rendering(3) Coin vbo_rendering(3)
2
3
4
6 vbo_rendering - Vertex array and VBO rendering in Coin
7
8 Coin 2.5 added improved support for OpenGL vertex array and VBO
9 rendering. This might lead to major rendering performance improvements
10 compared to the old rendering code. The new rendering code has been
11 added for the SoIndexedFaceSet, SoVRMLIndexedFaceSet, SoIndexedLineSet,
12 SoVRMLIndexedLineSet, SoPointSet and SoVRMLPointSet nodes.
13
14 To take advantage of the improved performance vertex array and VBO
15 rendering yields, you'll need to organize your vertex data in a way
16 that makes it possible to render it with OpenGL vertex arrays. OpenGL
17 vertex array rendering does not support multiple index arrays, so all
18 your vertex data (coordinates, normals, colors and texture coordinates)
19 must use the same index array; or use OVERALL binding. For the indexed
20 nodes, this means that PER_VERTEX_INDEXED and OVERALL are the only
21 supported bindings for materials, normals and texture coordinates. When
22 PER_VERTEX_INDEXED binding is used, the corresponding index field
23 should by empty. This will signal the shape to use the coordIndex field
24 for indices. Below is an example scene graph that will be rendered
25 using vertex arrays:
26
27 NormalBinding { value PER_VERTEX_INDEXED }
28 Coordinate3 {
29 point [
30 0 0 0, # 0
31 1 0 0, # 1
32 2 0 0, # 2
33 0 1 0, # 3
34 1 1 0, # 4
35 2 1 0, # 5
36 0 2 0, # 6
37 1 2 0, # 7
38 2 2 0, # 8
39
40 2 0 0, # 9
41 2 0 -1, # 10
42 2 1 0, # 11
43 2 1 -1, # 12
44 2 2 0, # 13
45 2 2 -1 # 14
46 ]
47 }
48 Normal {
49 vector [
50 0 0 1, # 0
51 0 0 1, # 1
52 0 0 1, # 2
53 0 0 1, # 3
54 0 0 1, # 4
55 0 0 1, # 5
56 0 0 1, # 6
57 0 0 1, # 7
58 0 0 1, # 8
59
60 1 0 0, # 9
61 1 0 0, # 10
62 1 0 0, # 11
63 1 0 0, # 12
64 1 0 0, # 13
65 1 0 0 # 14
66 ]
67 }
68
69 IndexedFaceSet {
70 coordIndex [
71 0, 1, 4, 3, -1,
72 1, 2, 5, 4, -1,
73 3, 4, 7, 6, -1,
74 4, 5, 8, 7, -1,
75
76 9, 10, 12, 11, -1,
77 11, 12, 14, 13, -1
78 ]
79 normalIndex [ ] # = use coordIndex
80 }
81
82 Please note that since only one index array can be used, it might be
83 necessary to supply duplicate normals and coordinates to meet this
84 requirement.
85
86 Also, if normals are needed, you have to supply them. A shape with
87 autogenerated normals can't be rendered using vertex arrays (since a
88 single coordinate might get multiple normals).
89
90 The PointSet nodes can always be rendered using vertex arrays since
91 these nodes haven't got index arrays, and the only bindings supported
92 are PER_VERTEX and OVERALL.
93
94 If it's inconvenient to create vertex array ready scene graphs directly
95 from your application, it's also possible to use SoReorganizeAction to
96 reorganize the geometry before rendering.
97
98
99
100Version 2.5.0 Wed Jan 18 2023 vbo_rendering(3)