Primitive Functions

Jump to navigation Jump to search
Vertex ordering for various primitive types with clockwise orientation.

This article is an overview of primitive and model related functions, these are a more simplified interface to drawing 3D primitives compared to vertex formats and vertex functions which are for advanced use, such as multitexturing.

These functions exist for drawing simple and quick primitives. They will draw and clear their vertex at the end of the primitive.

These are for 3D primitives.

These functions exist for creating and loading models, these are not the same as the primitive functions, in that you create the model once and then simply draw the model, so you don't have to specify the vertices each time you draw.
Note: Primitive adding can not be done after the first draw call for a model because at that point the models vertex data is buffered to the GPU.

All of the basic shape functions that can be auto generated.

These functions exist for drawing a basic shape in the draw event.
Note: Normals for basic shapes are automatically precalculated.

These functions are for adding a basic shape onto an existing model, they are generally quicker because many of them can be batched into few draw calls.