Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

globals not collapsing correctly #224

Open Aeva opened 8 years ago

Aeva commented 8 years ago

If you look at the compiler output for "deferred_renderer/main.frag", you see that _mgrl_switch_diffuse_color_function is defined redundantly. And then this won't build because its a redefinition :P

The only ones that are repeated are the generated switch variables for swappable methods. I'm not sure why this is happening at the time of writing.

Aeva commented 8 years ago

I'm not really sure why the fix works, but tests pass >_>. Basically seems like when there are inclusions, the virtual globals get pulled in that way, otherwise they need to be generated.

I think this needs a cleanup or some code comments or something before closing >_>