mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-26 16:05:45 +03:00
Added Vertex/Index cost per Primitive table.
parent
61dba1a0db
commit
fa545d7bc3
1 changed files with 71 additions and 0 deletions
71
Draw-List.md
71
Draw-List.md
|
|
@ -661,3 +661,74 @@ Fills the staged path using `AddConvexPolyFilled()` and clears the path. See `Ad
|
|||
### `PathFillConcave(col)`
|
||||
|
||||
Fills the staged path using `AddConcavePolyFilled()` and clears the path. See `AddConcavePolyFilled()` for more information.
|
||||
|
||||
# Vertex/Index cost per Primitive
|
||||
|
||||
Old: up to 1.92.9
|
||||
<BR>New: from 1.93.0
|
||||
|
||||
```
|
||||
AddLine()
|
||||
- Old 4 vtx, 2 tris |
|
||||
- New 4 vtx, 2 tris | <-- Common
|
||||
- New 8 vtx, 6 tris | with _AALineEnds
|
||||
|
||||
AddLineH(), AddLineV()
|
||||
- Old 4 vtx, 2 tris |
|
||||
- New 4 vtx, 2 tris | when aligned <-- Common
|
||||
- New 4 vtx, 2 tris |
|
||||
- New 8 vtx, 6 tris | with _AALineEnds
|
||||
|
||||
AddRect()
|
||||
- Old ?? | r=0
|
||||
- Old 16 vtx, 16 tris | with rounding (r=1..2)
|
||||
- Old 24 vtx, 24 tris | with rounding (r=3)
|
||||
- Old 32 vtx, 32 tris | with rounding (r=4..8)
|
||||
- Old 40 vtx, 40 tris | with rounding (r=9..15)
|
||||
- New 8 vtx, 8 tris | no rounding
|
||||
- New 8 vtx, 8 tris | when aligned, no rounding <-- Common
|
||||
- New 32 vtx, 16 tris | when aligned, baked rounding (r=1..16) <-- Common
|
||||
- New 16 vtx, 16 tris | with rounding (r=1..2)
|
||||
- New 24 vtx, 24 tris | with rounding (r=3)
|
||||
- New 32 vtx, 32 tris | with rounding (r=4..8)
|
||||
- New 40 vtx, 40 tris | with rounding (r=9..15)
|
||||
- New 19 vtx, 20 tris | tiny-rounding (r=1..2)
|
||||
- New 31 vtx, 32 tris | tiny-rounding (r=9..15)
|
||||
(PS: baked rounding is faster than old code)
|
||||
|
||||
AddRectFilled()
|
||||
- Old 4 vtx, 2 tris | no rounding [no AA]
|
||||
- Old 16 vtx, 22 tris | with rounding (r=1..2)
|
||||
- Old 24 vtx, 34 tris | with rounding (r=3)
|
||||
- Old 32 vtx, 46 tris | with rounding (r=4..8)
|
||||
- Old 40 vtx, 58 tris | with rounding (r=9..15)
|
||||
- New 4 vtx, 2 tris | when aligned, no rounding <-- Common
|
||||
- New 16 vtx, 18 tris | when aligned, baked rounding (r=1..16) <-- Common
|
||||
- New 8 vtx, 10 tris | no rounding
|
||||
- New 16 vtx, 22 tris | with rounding (r=1..2)
|
||||
- New 24 vtx, 34 tris | with rounding (r=3)
|
||||
- New 32 vtx, 46 tris | with rounding (r=4..8)
|
||||
- New 40 vtx, 58 tris | with rounding (r=9..15)
|
||||
|
||||
AddPolyline()
|
||||
- Old: N*2 vtx, (N-1)*2 tris | textured path, no-AA e.g for N=6: 12 vtx, 10 tris
|
||||
- Old: N*3 vtx, (N-1)*4 tris | 1 pixel wide, AA e.g for N=6: 18 vtx, 20 tris
|
||||
- Old: N*4 vtx, (N-1)*6 tris | Wider, AA e.g for N=6: 24 vtx, 30 tris
|
||||
- New: N*2 vtx, (N-1)*2 tris | No bevel, closed, no-AA e.g for N=6: 12 vtx, 10 tris
|
||||
- New: N*2+4 v, (N-1)*2+4 tris | No bevel, open e.g for N=6: 16 vtx, 14 tris
|
||||
- New: N*4+4 v, (N-1)*5+4 tris | All bevels, open e.g for N=6: 28 vtx, 29 tris (theorical max)
|
||||
(PS: ImDrawFlags_MiterOnly implies no bevel. Each bevels adds +2 vtx, +3 tris)
|
||||
|
||||
AddBezierCubic()
|
||||
AddBezierQuadratic()
|
||||
- New: with _AALineEnds: adds +4 vtx, +4 tris
|
||||
|
||||
AddQuad(), AddTriangle()
|
||||
- New: each bevel corner adds +2 vtx, +3 tris
|
||||
|
||||
AddCircle(), AddNgon(), AddEllipse()
|
||||
- No change
|
||||
|
||||
AddCircleFilled(), AddNgonFilled(), AddEllipseFilled()
|
||||
- No change
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue