Changes between Version 64 and Version 65 of WikiStart
- Timestamp:
- Jan 4, 2013, 4:31:05 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v64 v65 36 36 A: Because the Haskell Platform (HP) doesn't use the latest version of GHC. The [http://hackage.haskell.org/package/gloss-examples gloss-examples] package depends on [http://hackage.haskell.org/package/repa repa] via the [http://hackage.haskell.org/package/gloss-raster gloss-raster] package. Repa itself is tightly coupled to a particular version of GHC because it depends on properties of the GHC simplifier for good performance. When the HP does not use the latest GHC we provide a specific Gloss package for it, whose API should be identical to the most recent version. For the Haskell Platform 2012.04 you should use [http://hackage.haskell.org/package/gloss-1.7.7.201204.1 gloss-1.7.7.201204.1]. 37 37 38 '''Q: Gloss crashes at startup.'''[[br]] 39 A0: On Windows there is a known issue with the version of freeglut that comes with the Haskell Platform 2012.2.0.0. Upgrade your Haskell Platform or install freeglut >= 2.8.0.[[br]] 40 A1: On other systems, you can also try upgrading freeglut to the latest version. If doing this solves a crash-bug on a non-Windows machine then please email me about it `gloss [wibble] ouroborus.net`and I'll update this wiki. 41 42 '''Q: Gloss freezes in `ghci`. It tries to draw the window but I don't get a picture and must kill the process.'''[[br]] 43 A0: Upgrade to at least GHC 7.4[[br]] 44 A1: Start `ghci` with `-fno-ghci-sandbox`. This is because OpenGL uses thread local state, which doesn't work when the running program is in a different thread.[[br]] 45 A2: Try installing gloss to use the GLFW window manager interface instead of GLUT: `cabal install gloss --flags="GLFW -GLUT"` 46 38 47 '''Q: I tried to draw a polygon shaped like a star, but it looks wrong.'''[[br]] 39 48 A: Gloss does not support non-convex polygons. You'll need to break up your picture into several separate convex polygons (eg, triangles). Gloss calls OpenGL directly to draw polygons, and the API doesn't handle non-convex ones. To fix this we'll need to write a triangulation function (#11). … … 46 55 This problem with a fixed size transform stack is discussed further in Section 4 of [http://www.opengl.org/archives/resources/features/KilgardTechniques/oglpitfall/ Overflowing the Projection Matrix Stack]. Gloss tries not to use the stack when it doesn't have to, but we don't know of any way to spill the stack to main memory to allow more entries. If you know how to solve this problem without giving up on hardware acceleration and doing the transforms in software, then please let us know on the mailing list. 47 56 48 '''Q: Gloss crashes at startup.'''[[br]]49 A0: On Windows there is a known issue with the version of freeglut that comes with the Haskell Platform 2012.2.0.0. Upgrade your Haskell Platform or install freeglut >= 2.8.0.[[br]]50 A1: On other systems, you can also try upgrading freeglut to the latest version. If doing this solves a crash-bug on a non-Windows machine then please email me about it `gloss [wibble] ouroborus.net`and I'll update this wiki.51 52 '''Q: Gloss freezes in `ghci`. It tries to draw the window but I don't get a picture and must kill the process.'''[[br]]53 A0: Upgrade to at least GHC 7.4[[br]]54 A1: Start `ghci` with `-fno-ghci-sandbox`. This is because OpenGL uses thread local state, which doesn't work when the running program is in a different thread.[[br]]55 A2: Try installing gloss to use the GLFW window manager interface instead of GLUT: `cabal install gloss --flags="GLFW -GLUT"`56 57 57 '''Q: Animations seem jerky.'''[[br]] 58 58 A: Make sure you're compiling with {{{-O2 -threaded}}}. Without the threaded runtime, the code that manages the frame rate will behave badly. This is because GHC takes too long to reschedule the gloss process after the sleep timer has expired. With the threaded runtime, most simple animations should run at about 100fps, which is our internal frame-rate cap. … … 64 64 A: Pass GHC the flag `-optl-mwindows` when compiling the program. At runtime, if your program tries to write to `stdout` or `stderr` then Windows will kill the process. 65 65 66 '''Q: The window doesn't reshape properly under Xmonad.'''[[br]]66 '''Q: With Xmonad, the Gloss window doesn't resize properly.'''[[br]] 67 67 A: Use the GLFW window manager interface instead, or prod the Xmonad people about it. This is probably an incompatibility between Xmonad and GLUT, but the main Gloss developer doesn't use Xmonad. 68 68