Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

vbo_rendering(3) [debian man page]

vbo_rendering(3)						       Coin							  vbo_rendering(3)

NAME
vbo_rendering - Vertex array and VBO rendering in Coin Coin 2.5 added improved support for OpenGL vertex array and VBO rendering. This might lead to major rendering performance improvements compared to the old rendering code. The new rendering code has been added for the SoIndexedFaceSet, SoVRMLIndexedFaceSet, SoIndexedLineSet, SoVRMLIndexedLineSet, SoPointSet and SoVRMLPointSet nodes. To take advantage of the improved performance vertex array and VBO rendering yields, you'll need to organize your vertex data in a way that makes it possible to render it with OpenGL vertex arrays. OpenGL vertex array rendering does not support multiple index arrays, so all your vertex data (coordinates, normals, colors and texture coordinates) must use the same index array; or use OVERALL binding. For the indexed nodes, this means that PER_VERTEX_INDEXED and OVERALL are the only supported bindings for materials, normals and texture coordinates. When PER_VERTEX_INDEXED binding is used, the corresponding index field should by empty. This will signal the shape to use the coordIndex field for indices. Below is an example scene graph that will be rendered using vertex arrays: NormalBinding { value PER_VERTEX_INDEXED } Coordinate3 { point [ 0 0 0, # 0 1 0 0, # 1 2 0 0, # 2 0 1 0, # 3 1 1 0, # 4 2 1 0, # 5 0 2 0, # 6 1 2 0, # 7 2 2 0, # 8 2 0 0, # 9 2 0 -1, # 10 2 1 0, # 11 2 1 -1, # 12 2 2 0, # 13 2 2 -1 # 14 ] } Normal { vector [ 0 0 1, # 0 0 0 1, # 1 0 0 1, # 2 0 0 1, # 3 0 0 1, # 4 0 0 1, # 5 0 0 1, # 6 0 0 1, # 7 0 0 1, # 8 1 0 0, # 9 1 0 0, # 10 1 0 0, # 11 1 0 0, # 12 1 0 0, # 13 1 0 0 # 14 ] } IndexedFaceSet { coordIndex [ 0, 1, 4, 3, -1, 1, 2, 5, 4, -1, 3, 4, 7, 6, -1, 4, 5, 8, 7, -1, 9, 10, 12, 11, -1, 11, 12, 14, 13, -1 ] normalIndex [ ] # = use coordIndex }.fi Please note that since only one index array can be used, it might be necessary to supply duplicate normals and coordinates to meet this requirement. Also, if normals are needed, you have to supply them. A shape with autogenerated normals can't be rendered using vertex arrays (since a single coordinate might get multiple normals). The PointSet nodes can always be rendered using vertex arrays since these nodes haven't got index arrays, and the only bindings supported are PER_VERTEX and OVERALL. If it's inconvenient to create vertex array ready scene graphs directly from your application, it's also possible to use SoReorganizeAction to reorganize the geometry before rendering. Version 3.1.3 Wed May 23 2012 vbo_rendering(3)

Check Out this Related Man Page

GLNORMALPOINTER(3G)													       GLNORMALPOINTER(3G)

NAME
glNormalPointer - define an array of normals C SPECIFICATION
void glNormalPointer( GLenum type, GLsizei stride, const GLvoid *pointer ) PARAMETERS
type Specifies the data type of each coordinate in the array. Symbolic constants GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and GL_DOUBLE are accepted. The initial value is GL_FLOAT. stride Specifies the byte offset between consecutive normals. If stride is 0- the initial value-the normals are understood to be tightly packed in the array. The initial value is 0. pointer Specifies a pointer to the first coordinate of the first normal in the array. The initial value is 0. DESCRIPTION
glNormalPointer specifies the location and data of an array of normals to use when rendering. type specifies the data type of the normal coordinates and stride gives the byte stride from one normal to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see glInterleavedArrays.) When a nor- mal array is specified, type, stride, and pointer are saved as client-side state. To enable and disable the normal array, call glEnableClientState and glDisableClientState with the argument GL_NORMAL_ARRAY. If enabled, the normal array is used when glDrawArrays, glDrawElements, or glArrayElement is called. Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glArrayElement to specify primitives by indexing vertices and vertex attributes and glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes. NOTES
glNormalPointer is available only if the GL version is 1.1 or greater. The normal array is initially disabled and isn't accessed when glArrayElement, glDrawElements, or glDrawArrays is called. Execution of glNormalPointer is not allowed between glBegin and the corresponding glEnd, but an error may or may not be generated. If an error is not generated, the operation is undefined. glNormalPointer is typically implemented on the client side. Since the normal array parameters are client-side state, they are not saved or restored by glPushAttrib and glPopAttrib. Use glPushClientAttrib and glPopClientAttrib instead. ERRORS
GL_INVALID_ENUM is generated if type is not an accepted value. GL_INVALID_VALUE is generated if stride is negative. ASSOCIATED GETS
glIsEnabled with argument GL_NORMAL_ARRAY glGet with argument GL_NORMAL_ARRAY_TYPE glGet with argument GL_NORMAL_ARRAY_STRIDE glGetPointerv with argument GL_NORMAL_ARRAY_POINTER SEE ALSO
glArrayElement, glColorPointer, glDrawArrays, glDrawElements, glEdgeFlagPointer, glEnable, glGetPointerv, glIndexPointer, glInterleavedArrays, glPopClientAttrib, glPushClientAttrib, glTexCoordPointer, glVertexPointer GLNORMALPOINTER(3G)
Man Page