PaintLab / PixelFarm

From Vectors to (sub) Pixels, C# 2D Rendering Library
Other
156 stars 21 forks source link

[INFO] Tesselation Note #44

Closed prepare closed 5 years ago

prepare commented 5 years ago

OpenGL Tess/ Winding Rule Type Note:

gluTess_winding_rule_type

from https://www.glprogramming.com/red/chapter11.html

see more => http://what-when-how.com/opengl-programming-guide/polygon-tessellation-tessellators-and-quadrics-opengl-programming-part-2/

prepare commented 5 years ago

Tess with NONZERO winding rule

we use NONZERO winding rule as default (compat with Agg/CpuBlit)

tess_rect5

To have a hole, outer and inner must not go in the same direction

prepare commented 5 years ago

Tess with ODD winding rule

To have a hole, outer border and inner border can go in any direction (clockwise,counter-clockwise)

tess_rect4

outer and inner border go in the same direction, tess provide a hole too