ands / seamoptimizer

A C/C++ single-file library that minimizes the hard transition errors of disjoint edges in lightmaps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stack overflow

guycalledfrank opened this issue · comments

commented

Using complex geometry/lightmaps and alloca() calls gives me stack overflow:
https://github.com/ands/seamoptimizer/blob/master/seamoptimizer.h#L876
Any reason not to use normal malloc/_aligned_malloc/something not using stack? malloc seems to fix the crash for me.

commented

It was just an optimization since I, so far, never encountered seams so big that this was an issue.
It would indeed make sense though to use malloc for larger allocations :)