qbism / q2tools-220

Quake 2 map compiler tools with v220 map support, automatic phong, enhancements, and fixes.
GNU General Public License v2.0
61 stars 20 forks source link

do not use so much stack #27

Closed MysticalUnicat closed 1 year ago

MysticalUnicat commented 1 year ago

4rad was giving me a lot of issues, compiling with mingw64. failing in a function called __chkstk_ms . turns out using a lot of stack space causes issues with that setup :(. the solution for me to get 4rad running was to reduce stack use by allocating and freeing large stack objects. these operations are very quick and mostly happen with thread based functions. allocating memory for thread work makes sense so I went ahead with that change and another the main entry point and temp buffers for options.

Also included is the cmake I used to build.