diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-04-29 03:54:29 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-07-16 14:22:37 +0200 |
| commit | 8c6d3a47e08c9f1330d2316eaa708ff097d02d2a (patch) | |
| tree | 370aded9143a7b182dcbdc490e9df362d4c91095 /src/vkvg_context.c | |
| parent | 6ba0aa0111253b1b5fdea4d3e9e364ee994fd1da (diff) | |
add curve debug facility, measure frame rateCurvesDebug
Diffstat (limited to 'src/vkvg_context.c')
| -rw-r--r-- | src/vkvg_context.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c index 99ebcf9..6bdf6ed 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -31,6 +31,16 @@ static vec2 debugLinePoints[1000]; static uint32_t dlpCount = 0; #endif +void _init_debug_curves (VkvgContext ctx) { + ctx->m_approximation_scale = 1.0; + ctx->m_angle_tolerance = 0.05; + ctx->m_distance_tolerance = 0.1; + ctx->m_cusp_limit = 0.25; + ctx->curve_recursion_limit = 16; + ctx->curve_collinearity_epsilon = 0.001; + ctx->curve_angle_tolerance_epsilon = 0.1; +} + VkvgContext vkvg_create(VkvgSurface surf) { LOG(LOG_INFO, "CREATE Context: surf = %lu\n", surf); @@ -89,6 +99,8 @@ VkvgContext vkvg_create(VkvgSurface surf) ctx->references = 1; + _init_debug_curves (ctx); + return ctx; } void vkvg_flush (VkvgContext ctx){ |