Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not-gloss animations don't end cleanly #6

Open
Daniel-Diaz opened this issue Jun 15, 2013 · 2 comments
Open

not-gloss animations don't end cleanly #6

Daniel-Diaz opened this issue Jun 15, 2013 · 2 comments

Comments

@Daniel-Diaz
Copy link

I am running not-gloss animations from GHCi. Whenever I run one, and I close it, I get the following error:

freeglut ERROR: Function <glutPostRedisplay> called without first calling 'glutInit'.

After that, GHCi crashes too.

My platform is Linux(Debian) 7.

@ghorn
Copy link
Owner

ghorn commented Jul 31, 2013

I haven't been able to run at all in ghci. I always get this message:

...
...
Loading package not-gloss-0.5.0.4 ... linking ... done.
screen resolution 1920x1080
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
freeglut (<interactive>):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

As for your question, I think only freeglut supports stopping and starting with glutLeaveMainLoop (http://freeglut.sourceforge.net/docs/api.php#EventProcessing) and non-free-glut doesn't support exiting (http://www.opengl.org/discussion_boards/showthread.php/136742-Exit-Main-Loop).

I thing an upgrade from GLUT to something like GLFW is in order.

@dcw803
Copy link

dcw803 commented Oct 17, 2013

Try compiling your Haskell code (not interpreting), eg. ghc --make Thingy.hs, or invoking ghci with "-lglut". We
just found the exact same error message (on Ubuntu 13.04, ghci version 7.6.2, having ensured that
the libghc-glut-dev Ubuntu package was installed first). First we found that compiling the Haskell code and
running that worked fine, then we found that the interpreter worked if we ran "ghci -lglut Thingy.hs"; don't really
understand why it worked;-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants