MCPcopy Create free account
hub / github.com/carbonengine/trinity / ComputeVertexCount

Function ComputeVertexCount

trinityal/Tr2DrawUPHelper.cpp:12–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace
11{
12uint32_t ComputeVertexCount( Topology topology, uint32_t primitiveCount )
13{
14 switch( topology )
15 {
16 case TOP_TRIANGLES:
17 return primitiveCount * 3;
18
19 case TOP_TRIANGLE_STRIP:
20 return primitiveCount + 2;
21
22 case TOP_LINES:
23 return primitiveCount * 2;
24
25 case TOP_LINE_STRIP:
26 return primitiveCount + 1;
27
28 case TOP_POINTS:
29 case TOP_TRIANGLE_FAN:
30 return primitiveCount;
31
32
33 default:
34 CCP_ASSERT_M( false, "Unsupported topology" );
35 return 0;
36 }
37}
38
39}
40

Callers 5

DrawPrimitiveUPMethod · 0.85
DrawIndexedPrimitiveMethod · 0.85
DrawIndexedInstancedMethod · 0.85
DrawPrimitiveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected