google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.69k stars 1.87k forks source link

fix typo checking FILAMENT_ENABLE_MATDBG #7845

Closed pixelflinger closed 4 months ago

pixelflinger commented 4 months ago

this macro must be checked with #if not #ifdef

pixelflinger commented 4 months ago

that's interesting. Is there a preferred convention for filament between using the value vs. checking for the existent of the #define?

While fixing this I realized we do not have a well established convention; but it looks like everything that's set by cmake ends up being defined to 0 or 1, so #ifdef doesn't work.