Questions tagged [gloss]

The Haskell gloss package is a simple vector graphics drawing package.

Source

Gloss hides the pain of drawing simple vector graphics behind a nice data type and a few display functions. Gloss uses OpenGL under the hood, but you won't need to worry about any of that. Get something cool on the screen in under 10 minutes.

102 questions
11
votes
1 answer

"* Missing C library: GL" when installing gloss (specifically the OpenGLRaw dependency) on Ubuntu

I get the following error when trying to install gloss: Configuring OpenGLRaw-1.5.0.1... Failed to install OpenGLRaw-1.5.0.1 Build log ( /home//.cabal/logs/OpenGLRaw-1.5.0.1.log ): Configuring…
Gareth Charnock
  • 1,166
  • 7
  • 17
9
votes
3 answers

Haskell gloss: render Picture to Bitmap

I want to access the pixel data of what is being displayed to the window, but I have not had any luck finding such a function in gloss, nor by attempting to call OpenGL readPixels in a keyboard event callback. It looks like gloss renders a Picture…
Chris Wendt
  • 300
  • 3
  • 10
8
votes
0 answers

Can I use gloss on Android?

Gloss is a Haskell library for OpenGL games and simulations. Android seems to support OpenGL. Is there a way to run a library based on Gloss on an Android device?
PyRulez
  • 10,513
  • 10
  • 42
  • 87
8
votes
0 answers

haskell/gloss example error w/ GLUT dynamic library "Symbol not found: _glutBitmap8By13 error"

When I load the haskell / gloss examples (so far I've tried Wave and Snow), I seem to be getting an error with finding something in the GLUT shared libraries. What might cause this error and how can I fix it? can't load .so/.DLL for:…
daj
  • 6,962
  • 9
  • 45
  • 79
6
votes
1 answer

How to find mp4 metadata with ffmpeg-light in haskell?

I'm using ffmpeg-light, JuicyPixels and gloss to display a video with Haskell. I want to find the metadata of videos I'm playing automatically, but I have not yet found a way to do so. I would like to access metadata like the resolution and the…
user5696316
5
votes
0 answers

Mouse handler in Haskell Gloss on Mac

I was wrong about what the problem was. The event handlers worked fine, and everything works now. I found the answer on http://gloss.ouroborus.net/, and the relevant paragraph is cited below. I apologize for asking a misleading question. I would…
5
votes
1 answer

Why does my program exit immediately after playing a gloss animation?

I am learning how to use the Gloss library to make some animations in Haskell. Consider the code below which animates a circle that shrinks and expands its radius with time. import Graphics.Gloss import Graphics.Gloss.Interface.Pure.Game type…
smilingbuddha
  • 14,334
  • 33
  • 112
  • 189
5
votes
1 answer

Set OpenGL window hints in Gloss

I am looking into the gloss library and as any sane person I am quite irritated by the lack of anti-aliasing. I know some OpenGL window hints that help enabling anti-aliasing, especially the GL.lineSmooth hint. However looking through the Gloss…
NatureShade
  • 2,187
  • 1
  • 19
  • 27
5
votes
1 answer

How do I access Graphics.Gloss Event type in Haskell?

I'm attempting to use the Gloss library's play function, which takes an event-handling function whose first argument is of type Event (according to the Hackage documentation). I'm working on Windows with GHC 7.6.3 and Gloss 1.8.0.1. Here's a sketch…
4
votes
1 answer

How do find the width of a Text Picture in gloss?

In the Haskell Gloss library, one draws text with the Text constructor of the Picture type. But how, then does one find the width (and height) of such a picture?
user1023733
  • 805
  • 5
  • 14
4
votes
1 answer

Why doesn't Gloss render in native resolution?

On OSX (with 2560 x 1600 native resolution), Gloss displays everything at zoom-factor 2x. Giving a window size of 300 x 300 to the display function creates a window of 600 x 600. All content in that window is also twice as big (in each dimension),…
Merzhase
  • 61
  • 6
4
votes
2 answers

Include sprites into binary -- Gloss library

I am trying to make a flappy bird game in Haskell and I'd like to know if there's a way to "compile" the .bmp files into the binary? So I can only share the executable and don't need a folder with the sprites. I am using gloss-1.13.0.1 and loading…
Lorenzo
  • 2,160
  • 12
  • 29
4
votes
1 answer

How to hide the mouse cursor in Haskell Gloss

Is it possible to hide the cursor using Gloss in Haskell? We want to replace the player with the mouse position.
4
votes
0 answers

How to install an older version of base in Haskell

I have installed Haskell platform and I have the 7.10.3 version of ghci, which has the 4.8.2.0 version of base. I need to install gloss-1.8.* which needs base-4.7.* version of base. My question is how to install this older version now, when I…
Caroso
  • 111
  • 3
  • 12
4
votes
2 answers

How can I convert Alamofire's response to [JSON] using Gloss?

I'm replacing SwifyJSON library with Gloss. I have problems with converting my WS response to JSON format. In SwiftyJSON I did it this way: guard let data = response.result.value else { ... return } let jsonData =…
Cahir09
  • 501
  • 6
  • 14
1
2 3 4 5 6 7