DirectX 10 Game Programming : 3D Primer - Primitive Types

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

When drawing geometry, Direct3D has the option of interpreting the points you send in multiple ways. By connecting these points in different ways, it affects how your geometry is drawn. For instance, you could declare a series of three points; depending on the primitive type you select, these points could be drawn as either three individual dots or as a line-connected triangle.

Based on the primitive type you select, the number of points necessary to draw your object can be greatly reduced.

Direct3D offers the following primitive types:

  • Point lists

  • Line lists

  • Line strips

  • Triangle lists

  • Triangle strips

  • Triangle fans

Point Lists

A point list consists of a series of points that are not connected in any way. Figure 1 shows a grid containing four distinct points. Each point is defined using X, Y, and Z coordinates. For example, the top-left point would be defined as (1, 6, 0).

Figure 1. An example of rendered points using a point list.

Line Lists

Line lists consist of lines constructed by two points, one at each end. The lines within a line list are not connected. Figure 2 shows two lines rendered using a line list. This particular line list is constructed from four vertices. The line on the left is formed using (–6, 5, 0) for the upper coordinate and (–4, 2, 0) for the bottom coordinate.

Figure 2. Lines rendered using a line list.

Line Strips

Line strips are a series of connected lines where each additional line is defined by a single vertex. Each vertex in the line strip is connected to the previous vertex for a line. Figure 3 shows how a line list is constructed and rendered. The line list in this figure is constructed using a series of six vertices creating five lines.

Figure 3. Lines rendered using a line strip.

Triangle Lists

Triangle lists contain triangles that are not connected in any way and can appear anywhere within your world. Figure 4 shows two individual triangles constructed from six vertices. Each triangle requires three vertices to construct a complete triangle.

Figure 4. Triangles rendered using a triangle list.

Triangle Strips

Triangle strips are a series of triangles connected to one another where only one vertex is required to define each additional triangle. Figure 5 shows four triangles created using only six vertices.

Figure 5. Triangles rendered using a triangle strip.

Triangle strips are constructed first by creating three vertices to define the first triangle. If an additional vertex is defined, lines are drawn between the two

previously created vertices, forming another triangle. Within Figure 5, the order in which the vertices are created is shown.

Triangle Fans

Triangle fans are a series of triangles that share a common vertex. After the first triangle is created, each additional vertex creates another triangle with one of its points being the first vertex defined.

Figure 6 shows how a triangle fan consisting of three triangles is created using only five vertices. The order of the vertices controls what the triangle fan looks like. Figure 6 shows the order in which the vertices are created to construct the displayed fan.

Figure 6. Triangles rendered using a triangle fan.

Top 10
Free Mobile And Desktop Apps For Accessing Restricted Websites
TOYOTA CAMRY 2; 2.5 : Camry now more comely
KIA SORENTO 2.2CRDi : Fuel-sipping slugger
How To Setup, Password Protect & Encrypt Wireless Internet Connection
Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
Backup & Restore Game Progress From Any Game With SaveGameProgress
Generate A Facebook Timeline Cover Using A Free App
New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
- Messages forwarded by Outlook rule go nowhere
- Create and Deploy Windows 7 Image
- How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
- Creating and using an unencrypted cookie in ASP.NET
- Directories
- Poor Performance on Sharepoint 2010 Server
- SBS 2008 ~ The e-mail alias already exists...
- Public to Private IP - DNS Changes
- Send Email from Winform application
- How to create a .mdb file from ms sql server database.......
programming4us programming4us