[Haskell-cafe] Problem with GLUT - no visuals found

Chris Smith cdsmith at gmail.com
Thu Jun 23 17:33:50 CEST 2011


So I'm running into an embarrassing problem trying to prepare for the
computer programming class that I intend to 12-13 year olds in Haskell
this coming fall.

I had decided to use gloss, an excellent package by Ben Lippmeier that
makes it really easy to build images, animations, simulations, and games
in a straight-forward and functional way.  Excellent... but suddenly
broken on my system since installing Ubuntu 11.4, and it looks like the
cause traces back to GLUT.

Prelude Graphics.Gloss> displayInWindow "Test" (100,100) (100,100) white
(Circle 80)
freeglut (<interactive>):  ERROR:  Internal error <Visual with necessary
capabilities not found> in function fgOpenWindow
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  4 (X_DestroyWindow)
  Resource id in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  28

and

Prelude Graphics.UI.GLUT> initialize "foo" []
[]
Prelude Graphics.UI.GLUT> get displayModePossible 
False

Nothing I can find to change in GLUT causes displayModePossible to be
True, and I'm at the end of my knowledge here.

A quick web search turns up the occasional person complaining about the
freeglut error, but in all cases they have trouble running any GLUT
applications, and it turns out their configuration doesn't do direct
rendering.  In my case, glxgears and any other non-Haskell GLUT
applications I can find work great, but Haskell's GLUT bindings are
giving me no hint of success.

Any ideas?

-- 
Chris Smith




More information about the Haskell-Cafe mailing list