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 haddock docs there doesn't seem to be any obvious way to set OpenGL hints. So how would I go forward doing this?
Here's the best I can figure out...
gloss
abstracts graphics backends via the class Backend
type class, and there are two instances defined:
instance Backend GLFWState
instance Backend GLUTState
Which one is used is controlled at compile time via the WITHGLUT
and WITHGLFW
CPP macros.
This explains why gloss doesn't provide functions to customize the GL setup - as far as it is concerned the backend is abstract.
The initialization code for the GLUT backend is in the initializeGLUT
function in Graphics/Gloss/Internals/Interface/Backend/GLUT.hs
Perhaps you can modify that routine to set up GLUT they way you want to obtain a custom version of gloss.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With