SoftwareGuy256
Newcomer
It seems to me that a naive use of triangle fan would lead to a prohibitive amount of drawprimitives, essentially per polygon. Is triangle fan just a relic of the old days when low bus bandwith and memory were constraints? Here's part of an article I found off of MSDN:
Watch Out for DrawPrimitive Optimizations
In addition to state change optimizations, the runtime will attempt to optimize the number of draw calls that the driver has to process. For example, consider these back to back draw calls:
DrawPrimitive(D3DPT_TRIANGLELIST, 0, 3); // Draw 3 primitives, vertices 0 - 8
DrawPrimitive(D3DPT_TRIANGLELIST, 9, 4); // Draw 4 primitives, vertices 9 - 20
Example 5a: Two Draw Calls
This sequence contains two draw calls, which the runtime will consolidate into a single call equivalent to:
DrawPrimitive(D3DPT_TRIANGLELIST, 0, 7); // Draw 7 primitives, vertices 0 - 20
Example 5b: A Single Concatenated Draw Call
The runtime will concatenate both of these particular draw calls into a single call, which reduces the driver work by 50 percent because the driver will now only need to process one draw call.
In general, the runtime will concatenate two or more back-to-back IDirect3DDevice9:
rawPrimitive calls when:
The primitive type is a triangle list (D3DPT_TRIANGLELIST).
Each successive IDirect3DDevice9:
rawPrimitive call must reference consecutive vertices within the vertex buffer.
Similarly, the right conditions for concatenating two or more back-to-back IDirect3DDevice9:
rawIndexedPrimitive calls are:
The primitive type is a triangle list (D3DPT_TRIANGLELIST).
Each successive IDirect3DDevice9:
rawIndexedPrimitive call must sequential reference consecutive indices within the index buffer.
Each successive IDirect3DDevice9:
rawIndexedPrimitive call must use the same value for BaseVertexIndex.
To prevent concatenation during profiling, modify the render sequence so that the primitive type is not a triangle list, or modify the render sequence so that there are no back-to-back draw calls that use consecutive vertices (or indices). More specifically, the runtime will also concatenate draw calls that meet both of the following conditions:
Notice it won't even consolidate 2 DP's with no state changes if a fan is used.
Watch Out for DrawPrimitive Optimizations
In addition to state change optimizations, the runtime will attempt to optimize the number of draw calls that the driver has to process. For example, consider these back to back draw calls:
DrawPrimitive(D3DPT_TRIANGLELIST, 0, 3); // Draw 3 primitives, vertices 0 - 8
DrawPrimitive(D3DPT_TRIANGLELIST, 9, 4); // Draw 4 primitives, vertices 9 - 20
Example 5a: Two Draw Calls
This sequence contains two draw calls, which the runtime will consolidate into a single call equivalent to:
DrawPrimitive(D3DPT_TRIANGLELIST, 0, 7); // Draw 7 primitives, vertices 0 - 20
Example 5b: A Single Concatenated Draw Call
The runtime will concatenate both of these particular draw calls into a single call, which reduces the driver work by 50 percent because the driver will now only need to process one draw call.
In general, the runtime will concatenate two or more back-to-back IDirect3DDevice9:
The primitive type is a triangle list (D3DPT_TRIANGLELIST).
Each successive IDirect3DDevice9:
Similarly, the right conditions for concatenating two or more back-to-back IDirect3DDevice9:
The primitive type is a triangle list (D3DPT_TRIANGLELIST).
Each successive IDirect3DDevice9:
Each successive IDirect3DDevice9:
To prevent concatenation during profiling, modify the render sequence so that the primitive type is not a triangle list, or modify the render sequence so that there are no back-to-back draw calls that use consecutive vertices (or indices). More specifically, the runtime will also concatenate draw calls that meet both of the following conditions:
Notice it won't even consolidate 2 DP's with no state changes if a fan is used.