multithreading - forkOS seems to fail reserving the thread's local storage -


I am getting an error when using a different GL operation in a restoration (they work fine on the main thread Are). For example, createProgram is found by me:

User error (Unknown OpenGL Extension Entry glCreate Program, Checking OpenGL 3.1) < P> I'm calling it after starting my reference (4.3 core)
The problem is that I am getting this error while using forkOS , still it still fails (like I do not know about the GL context in TLS) .

What's going on?

  Module main where Import Graphics. UI Glut Import Control.Concurrent Import Control Main main: IO () main = getArgs and initial startProfile mode $ = [RGBMode, DoubleBfread] Initial Contextversion $ = (4,3) InitialContactProfile $ = [Coreprofile] initialContextFlags $ = [DebugTontext, ForwardContactContacts] Make Windows "GL Window" Create Programs - ForkOS makes $ zero; Works of publishing - Fail (user error) DisplayColoback $ = clearColor $ = Color4 0.2 0.2 1 1 Clear [ColorBuffer] Flush & gt; & Gt; Swapbuffers mainLoop    

OpenGL references are limited to a thread. Basically they are a TLS structure. forkOS will not automatically "take you to" the Open Gale context binding. The idea of ​​ forkOS is that the Haskell operation seen as the operating system is placed within the same thread, through the forkio handles, it can manipulate operations between threads through its scheduler. , Which would only like to keep FFI-Lie libraries and APIs on the Nightmare TLS Association.

When GLUT createWindow creates both a window and with a OpenCL reference and binds the calling thread.

So you want the option: Either you can rebalen the OpenGL reference on that other thread. Or else you make another reference, sharing a namespace on the first name, and binding it on another thread.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -