Vertex Functions


Revision as of 20:08, 1 December 2013 by RobertBColton (Talk | contribs)
Jump to: navigation, search
Vertex ordering for various primitive types with clockwise orientation.

This article is an overview of the vertex related functions. The vertex functions can be used to specify custom vertex formats that can allow multitexturing. In modern graphics programming, primitives and models are rendered from vertex buffers in OpenGL and Direct3D where the data for vertices and texture coordinates are packed together inside a buffer and sent to your graphics card before being rendered by the GPU. This works best when data is static, as sending data to the GPU is slow. Constantly sending data can interfere with the graphics pipeline. In addition, modern graphics cards are better optimized for drawing triangles. The OpenGL 1 graphics system does not utilize this behavior as older graphics cards may not support this, however OpenGL 3 and Direct3D 9 and later graphics systems do utilize this for models.

These functions add vertex position, diffuse, UV, and normal data.

These functions let you add the vertex data in a custom way yourself.

The vertex format functions let you specify exactly what format your model is in, and for instance how many texture coordinates each vertice in the primitive contains, effectively allowing you to multitexture.

See Also

Personal tools