On Sat, 14 Dec 2019, at 7:51 PM, bucha...@gmail.com wrote:
> If I understand correctly, that would prevent me from starting any other 
> goroutines. The following program deadlocks:

I doesn't prevent you starting other goroutines but you need to ensure that all 
calls to the OpenGL context are performed on the thread you initialised it with 
(my understanding is that this is because OpenGL uses thread local storage). 
Typically you can do this by sending closures containing OpenGL calls via a 
channel to an executor running in a goroutine locked to the main thread. There 
is/was an example of this in the gomobile codebase. I can share more detail if 
you get stuck.

-- Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0adcdc5a-dd2c-4506-9110-a3ecabc508b9%40www.fastmail.com.

Reply via email to