-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstracting the library over monad transformers #1
Comments
Related thing would be haskell-game/sdl2@5991a6b , though I use my own SDL bindings (incomplete and not on Hackage). |
I have no objection to abstracting everything to I think the |
Okay, then one little thing -- what codestyle do you prefer:
or
I can't figure this out from existing code. |
I think I prefer
Although I don't usually concern myself with such trifling matters =) |
Another question! Particularly,
|
Right now I'm not comfortable with |
Aha! That would be option 4) really -- I've been ignorant of this package all this time! Great, I'll use it. |
https://github.com/Noeda/caramia/blob/master/src/Graphics/Caramia/Context.hs#L132 |
I don't think I've tried The comment refers to a situation where a completely broken OpenGL is being used and functions may be no-ops or something. I'm not sure if it actually happens anywhere. |
Things become more and more cryptic for me. I've added small executables to show GL version using both my SDL library and sdl2 (1 and 2) . Here's what I'm getting:
Any ideas what's going on? I'm using Upd: These don't use caramia at all, but I was getting same strings while adding |
Something I did notice that the second program (and my toys) don't initialize the SDL2 library. Try fixing them and trying again? |
Yes, that works now. I'll ask someone with a Mac to run this tool to find a consistent version detecting way. Also, I've found how can I get zeros from MINOR/MAJOR:
This is on an old integrated Intel card (I'm using |
I have access to an OS X and can do some testing later today if you don't have immediate access. I also have an intel and nVidia drivers to test with but I don't have immediate access to any AMD cards. |
Oh, good then -- I wanted to make One Right |
A more error-aware version: abbradar@3c2dcb0 (I can make a PR if you want) |
It seems that glGetIntegerv actually does work on OS X (maybe my faulty toys that didn't initialize sdl2 led me astray). OS X doesn't have OpenGL 4.4 (it has 4.1). gl-info has a bug that it calls |
Closing this issue since we went for the MonadIO abstraction, let's keep issues organized. |
What do you think of abstracting most of the library over
MonadIO
? This would make life easier for people using monad transformers (like me), but it can introduce overhead (it can be mitigated for plain IO users with SPECIALIZE, though, to have no regressions). Exceptions shouldn't be an issue internally because you don't use transformers in the library (noMonadBaseControl
stuff). I can try to make necessary changes if there is an interest, but I'd like to hear opinions first.Another thing of interest may be to convert
Draw
into a monad transformer.The text was updated successfully, but these errors were encountered: