Olli Wang
Olli Wang
So that's the issue only happened on 10.13. Unfortunately, all of my mac devices are upgraded to 10.14. You will need to fix it by yourself if you want to...
@olilarkin It seems that commenting out this line would fix the issue: https://github.com/ollix/MetalNanoVG/blob/e1aad96565191638d4c8e0a804674b70837d6bcb/src/nanovg_mtl.m#L683 Can you test it in your real project to check if there is any side effect?
Sure. Please test your real project on both retina and non-retina screens. :)
@olilarkin Thanks for reporting. I just found that the transparency is gone for this solution. We'll need another solution. :(
nanovg itself is not thread safe as mentioned in https://github.com/memononen/nanovg/issues/292. `s_framebuffer` is only a weak reference to the currently binded framebuffer through `mnvgBindFramebuffer()`. Users should call `mnvgBindFramebuffer(NULL)` manually afterward. The...
I didn't test multithreading environment. But I think it's ok to move the global `s_framebuffer` into `MNVGcontext` and renamed to `bindedFramebuffer`.
Thanks for correction. Do you have multithreading environment to test the result? There may need an additional `mnvgUnbindFramebuffer()` function to make the changes work. However, that would break the consistency...
Do you have a real example demonstrating the difference? `discard_fragment()` was used in the earlier versions, but the performance is much worse than `float4(0)`.
I just tested both methods on my iMac 5K (Late 2014). I think the difference is negligible. Can you tell which one uses `discard_fragment()` in the pic below?
You may find an example here: https://github.com/memononen/nanovg/pull/298