You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem: when writing a HsSDL2 code that uses OpenGL, no GL update gets displayed after a few frames.
Tha cause is that currently glContext is a ForeignPtr, which has a finalizer, that calls SDL_GL_DeleteContext when the Haskell RTS has no reference to the pointer. Unfortunately since we don't use this pointer explicitly in the code after we create it with glCreateContext, Haskell RTS frees it after some time. (Using touchForeignPtr will prevent the RTS from calling the finalizer.)
The text was updated successfully, but these errors were encountered:
The problem: when writing a HsSDL2 code that uses OpenGL, no GL update gets displayed after a few frames.
Tha cause is that currently glContext is a ForeignPtr, which has a finalizer, that calls
SDL_GL_DeleteContext
when the Haskell RTS has no reference to the pointer. Unfortunately since we don't use this pointer explicitly in the code after we create it withglCreateContext
, Haskell RTS frees it after some time. (UsingtouchForeignPtr
will prevent the RTS from calling the finalizer.)The text was updated successfully, but these errors were encountered: