haskell-opengl/GLUT

Feature Request: Flag to build with FREEGLUT_GLES

Closed this issue · 4 comments

In cmake you can add the flag -DFREEGLUT_GLES=ON, per the docs. It would be nice to have that option here too.

I would need some more info regarding this: What platform are you talking about and what goes wrong without that flag?

The GLUT package only links against glut32/GLUT/glut (depending on the platform) and is agnostic about the OpenGL library itself. It relies on the dependencies of the glut library itself instead.

The GLUT API itself doesn't change with that preprocessor #define, it just #includes different GL headers during compilation of freeglut itself and links against different libraries. So from the point of view of the GLUT package I can't see what needs to be done.

Ok maybe there's nothing to be done, from reading around this seemed like something that had to be done but could very possibly not be required. I'm trying to port Gloss to OpenGL ES so that I can use Gloss on Android and iOS. So from what you're saying it seems like I would just need to recompile GLUT with OpenGL ES, and if that's true do you think you could point me in the right direction on how to do that?

You will probably just make the selection of the library/framework to link against a bit smarter, see the relevant part of GLUT's cabal file. Perhaps you need new cases for os(ios) and/or os(android), but I can't tell you any more details: I don't have an easy way to check things on those platforms. Patches are welcome... 😉

Awesome, thanks for the help! If I figure it out I'll submit a patch