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
As an example, the reflex-glfw-demo is incompatible with OpenGL 3.3, so changing withGLWindow like this:
withGLWindow width height title f =do
liftIO $GL.setErrorCallback $Just simpleErrorPrinter
+ liftIO $GL.defaultWindowHints
+ liftIO $mapM_GL.windowHint
+ [ GL.WindowHint'ContextVersionMajor3+ , GL.WindowHint'ContextVersionMinor3+ , GL.WindowHint'OpenGLProfileGL.OpenGLProfile'Core+ , GL.WindowHint'OpenGLForwardCompatTrue ]
m <- liftIO $GL.createWindow width height title NothingNothing
makes the demo fail obscurely, without invoking the error callback:
[nix-shell:~/src/reflex-glfw]$ cabal build && dist/build/reflex-glfw-demo/reflex-glfw-demo
Building reflex-glfw-0.1.0.0...
Preprocessing library reflex-glfw-0.1.0.0...
[1 of 1] Compiling Reflex.GLFW ( src/Reflex/GLFW.hs, dist/build/Reflex/GLFW.o )
Preprocessing executable 'reflex-glfw-demo' for reflex-glfw-0.1.0.0...
Linking dist/build/reflex-glfw-demo/reflex-glfw-demo ...
reflex-glfw-demo: Prelude.head: empty list
A similar failure to invoke the handler can be observed if one fails to run Reflex.GLFW.init -- the error message is produced by withGLWindow itself, not the simpleErrorPrinter handler that is set up by the time of its invocation.
It is a bit mysterious..
The text was updated successfully, but these errors were encountered:
deepfire
changed the title
GLFW error callback doesn't appear to work
GLFW error callback doesn't appear to work, at least during GLFW init time
Mar 20, 2017
As an example, the
reflex-glfw-demo
is incompatible with OpenGL 3.3, so changingwithGLWindow
like this:makes the demo fail obscurely, without invoking the error callback:
A similar failure to invoke the handler can be observed if one fails to run
Reflex.GLFW.init
-- the error message is produced bywithGLWindow
itself, not thesimpleErrorPrinter
handler that is set up by the time of its invocation.It is a bit mysterious..
The text was updated successfully, but these errors were encountered: