-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s_framebuffer isn't thread safe #6
Comments
nanovg itself is not thread safe as mentioned in memononen/nanovg#292.
|
How unfortunate. Where is the global state in nanovg? |
I couldn't find any global state in nanovg itself. Perhaps it is ok to use different nanovg contexts on different threads? Obviously, you can't use a single context in multiple threads. |
I didn't test multithreading environment. But I think it's ok to move the global |
|
Thanks for correction. Do you have multithreading environment to test the result? There may need an additional |
I'm only rendering on a single thread at a time. The way I did it, calling Here's my change: wtholliday@e2c9b99 I think it's ok for the backend APIs to differ a little. |
s_framebuffer
is a global variable and isn't thread safe.Furthermore,
mnvgDeleteFramebuffer
leavess_framebuffer
dangling.The text was updated successfully, but these errors were encountered: