Vertex Functions

From ENIGMA

(Difference between revisions)
Jump to: navigation, search
(Fixed grammer and removed redundancies.)
Line 1: Line 1:
[[Image:Primitivetypes.png|thumb|300px|Vertex ordering for various primitive types with clockwise orientation.]]
[[Image:Primitivetypes.png|thumb|300px|Vertex ordering for various primitive types with clockwise orientation.]]
-
This article is an overview of vertex related functions, they 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 [[DirectX|Direct3D]], what this means is that the data for vertices and texture coordinates are packed together inside a buffer and sent to your graphics card and rendered by the GPU. Modern graphics cards are designed to do one thing very well, and that is to draw lots and lots of triangles. By constantly sending vertex and texture coordinate data and normals to the GPU you interfere with the graphics pipeline, and this can cause slow downs in games. So it is best to use vertex buffers and buffer primitives only one time and let them sit on the GPU without interference. OpenGL 1 graphics system does not utilize this behavior as older graphics cards may not support this, however [[OpenGL|OpenGL 3]] and [[DirectX|Direct3D 9]] and later graphics systems do utilize this for models. These functions give you more control over your vertex buffer by letting you specify custom formats and do multitexturing so that you only send what you absolutely need to send to the GPU.
+
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 [[DirectX|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|OpenGL 3]] and [[DirectX|Direct3D 9]] and later graphics systems do utilize this for models.
* [[vertex_create_buffer]]
* [[vertex_create_buffer]]

Revision as of 01:02, 30 November 2013

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.

Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox