Fixing gpencil screen drawing after warning cleanup
I find strange that this needs to be static, and can see this being an issue for simultaneous drawing in the future. That said, better leave it working as before.
* gcc complain if you have a "main" variable * Missing header include in gpencil_draw.w * A few shadowed variables (we should avoid common names in (#define) macros) * Clear ambiguity in (!flag & VALUE) -> ((flag & VALUE) == 0)
The builtin shaders are free in blender close, so the engine must not free them. The memory leak was relatred to recreate the shaders again and again, so the free only use the last copy.
WIP: new method to calculate scale of the stroke thickness
The previous scale method was not valid because only was affected by viewport, but not by GP object or Stroke location. Now, the pixel size is calculated depending of zdepth and used to scale the stroke thickness.
Maybe there are other ways to do it, but this approach works, so we keep it before finding better methods