Skip to content

tess2: match Android index width to openFrameworks - #618

Merged
danoli3 merged 1 commit into
openframeworks:bleedingfrom
danoli3:fix-tess2-android-index-width
Oct 8, 2026
Merged

danoli3 merged 1 commit into
openframeworks:bleedingfrom
danoli3:fix-tess2-android-index-width

Conversation

@danoli3

@danoli3 danoli3 commented Oct 8, 2026

Copy link
Copy Markdown
Member

Android's NDK defines ANDROID, while the patched tesselator.h only checked ANDROID/TARGET_ANDROID. For arm64 and x86 Android builds this selected 32-bit TESSindex in the library, while openFrameworks selected 16-bit indices in its consumer. Reading the archive's index buffer then produced sequences such as 0 0 1 0 2 0, corrupting any ofPath fill.

Add ANDROID to the existing 16-bit platform condition and increment tess2 BUILD_ID from 2 to 3 so cached Android archives are rebuilt. The same patched header is copied into the package. Desktop index width remains unchanged.

The supplied emulator comparison shows the existing failure: the intended star is absent on ES 1.1 and collapses to a triangle on ES 2.0/3.0/3.1. This is before-fix evidence, not a screenshot of the rebuilt result.

Expected iOS star versus the broken Android ES 1.1, 2.0, 3.0 and 3.1 fills

Validation:

  • Verified pinned tess2 1.0.2 source SHA-256 and applied the updated patch.
  • Rebuilt static archives with the formula's CMakeLists.txt using NDK 28 for arm64-v8a, armeabi-v7a, x86 and x86_64.
  • Linked and ran the star regression on an arm64 Android API 34 emulator: 2-byte indices, 10 non-degenerate triangles, expected filled area 120.
  • Host regression separately compiled the library with ANDROID and its consumer with TARGET_ANDROID: same passing geometry result. Desktop regression retains 4-byte indices and identical geometry.
  • Added the focused C regression source; shell syntax, formula checksum audit (44/44) and git diff --check pass.

CI packaging/publication and a full glMatrix/ofPath rendering check with the published replacement libraries remain pending. Related consumer report: openframeworks/openFrameworks#8533.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant