Meshes and Draw Calls

8 flashcardsby Nijelous
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
Types of Primitives
Point Primitives: A set of points on the screen (vertexes)
Line Primitives: Groups of two connecting different point primitives
Line Strip Primitives: Groups of three point primitives connected by two lines
Line Loop Primitives: Groups of three point primitives connected by three lines
Triangle Primitives: Line Loop Primitives but fully filled in, distinct triangles
Triangle Strips: Takes the first three vertices as a triangle primitive, then creates triangles from the last vertex in the buffer (+2 vertices per triangle)
Triangle Fans: Takes the first three vertices as a triangle primitive, then creates triangles from the first (middlemost) vertex and the last vertex in the buffer (+1 vertices per triangle)
Quad Primitive: Line Loop Primitive but with four point primitives and lines
Convex Polygon Primitive: Line Loop Primitive but with n point primitives and lines
2
Vertex Buffers
How vertices are stored in memory, containing colour, texture coordinate (texture mapping), normal (reflecting light) etc.
Can either have one buffer with all info, arranged per vertex, or one buffer per attribute
3
Index Buffer
An integer buffer that indexes single vertices in a vertex buffer. The order in which the vertices should be displayed.
4
Accessing Data in Buffers
Offset: How many bytes into the allocation the first vertex attribute occurs
Stride: How many bytes must be jumped over to get from one attribute to the next
5
3D Models
A blueprint which provides instructions on how to draw the object, colour, parts, height, width, and length.

Provides the list of vertices for each model.
6
Dynamic Generation
Creating a list of vertices via programming for graphics, useful for procedurally generated landscapes
7
Efficiency in Vertex Preparation
CPU prepares the vertex list, and passes the data to the GPU
The GPU is constantly working on rendering the list (transforming vertices, rasterization, calculating fragment colours, etc.).
This is all done at a fixed rate.
8
Mesh
A complex shape made up of a set of primitives. The more primitives the more detailed the mesh.
Study all 8 cards for free