-
Notifications
You must be signed in to change notification settings - Fork 125
Description
When rendering from a thread (I made sure the current context is set the the thread using GLFW), I do get an error when resizing the window. This error does not occur all the time and is increasingly happening the higher the FPS.
It seems to happen when calling glDrawArrays() and I get multiple different errors:
Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
UNSUPPORTED (log once): setPrimitiveRestartEnabled:index: unsupported!
-[AGXG15XFamilyCommandBuffer renderCommandEncoderWithDescriptor:]:964: failed assertion A command encoder is already encoding to this command buffer’`
I have included a little example script which require: pyopengl, glfw (pyglfw) and numpy.
It is an Application class which instantiates two windows. Each Window starts up an update and a render thread. I make sure the current context is set on the render thread and the render thread only executes after the update thread is done.
By rendering on a different thread than the main thread, I can keep rendering even if glfw.poll_events() is blocking the main thread. This usually happens when moving and/or resizing the window. However, now it all seems to work on Windows 10/11 and MacOS Intel chip. But on my new Macbook Pro M3 it fails with the above errors (not all the time, I am able to resize the window until the errors happens).
I was hopeing someone could help me out on this. It seems related to Metal emulation from OpenGL but I'm not sure.