caramia
High-level OpenGL bindings
This is a highish-level OpenGL bindings library for real-time graphics for
Haskell, with minimum OpenGL version being 2.1.
Requirements:
* GHC 7.8+
* OpenGL 2.1 (with some extensions)
If the target system has OpenGL 3.3, then all features in this library should
be available unless stated otherwise. OpenGL contexts with 3.x or later
versions can be a core profile; this library does not care.
You need to use `-threaded` flag in executables that use this library.
Here are the most important features of this library:
* Safe and automatic finalization of OpenGL resources, with optional prompt
finalization.
* No implicit state (that is, no glBind* mess or equivalent). There is a
monad for mass-rendering that has implicit state but the state is localized
to running of that monad. (see Caramia.Render).
Here are some curious features that you might find useful.
* This library plays nice with other OpenGL libraries. It does not mess up
the implicit OpenGL state (except for aforementioned rendering monad).
* This library does not create an OpenGL context. You can use whatever
library you want to create an OpenGL context as long as it can get an
OpenGL 2.1 (or any later version) context. You may be interested at looking
at the tests in this package to see how to use this with the `sdl2`
package.
* Operations are generalized over `MonadIO`. Works on top of pure `IO` and
also in your custom monad stacks, as long as they implement `MonadIO`.
(At least) the following OpenGL concepts are present in this library:
* Buffer objects (you can do low-level mapping and use raw pointers)
* Geometry, vertex and fragment shaders
* Indexed and non-indexed rendering
* Framebuffers
* Textures (with many topologies, 1D, 2D, 3D, texture arrays, cube textures;
we also have buffer textures and multisampling textures)
* Vertex array objects
* Blending, stencil, depth and cull tests
* Instanced rendering
* Synchronization objects
* Query objects
This library tries to avoid including obsolete or redundant features of OpenGL.
Note that the library is in flux and API-breaking changes tend to happen
often.
| version | uploaded | uploader | changes | |
|---|---|---|---|---|
| 0.7.2.2 | 2015-05-09 08:24 UTC | Adeon | +115/−104 lines, 11 filesdep ~lineardep ~sdl2 | |
| 0.7.2.1 | 2015-03-27 11:50 UTC | Adeon | +3/−3 lines, 2 filesdep ~gl | |
| 0.7.2.0 | 2015-02-21 14:21 UTC | Adeon | +461/−110 lines, 22 filesdep +mtldep ~basedep ~containersdep ~sdl2 | |
| 0.7.1.1 | 2015-01-21 23:09 UTC | Adeon | +8/−7 lines, 4 files | |
| 0.7.1.0 | 2015-01-10 02:32 UTC | Adeon | +129/−76 lines, 9 filesdep +test-framework-quickcheck2dep −unixdep ~basedep ~transformers | |
| 0.7.0.1 | 2015-01-04 00:21 UTC | Adeon | +2/−1 lines, 1 files | |
| 0.7.0.0 | 2015-01-04 00:19 UTC | Adeon | +1098/−214 lines, 23 filesdep +HUnitdep +test-frameworkdep +test-framework-hunitdep ~basedep ~containersdep ~sdl2 | |
| 0.6.0.0 | 2014-12-26 01:22 UTC | Adeon | +730/−44497 lines, 21 filesdep +gldep ~OpenGLRawdep ~base | |
| 0.5.0.0 | 2014-12-19 15:33 UTC | Adeon | +298/−1799 lines, 9 filesdep +lensdep +linear | |
| 0.4.0.0 | 2014-12-08 21:57 UTC | Adeon | +44877/−34839 lines, 33 filesdep +exceptionsdep ~OpenGLRawdep ~basenew-component:exe:gl-infonew-component:exe:memory-infonew-component:exe:query-objectsnew-component:exe:smoke-testnew-component:exe:textures | |
| 0.3.0.1 | 2014-11-29 14:03 UTC | Adeon | +33569/−33569 lines, 2 filesdep ~sdl2 | |
| 0.3.0.0 | 2014-11-29 13:11 UTC | Adeon | +34158/−27838 lines, 10 filesdep +unixdep ~base | |
| 0.2.0.1 | 2014-10-21 07:14 UTC | Adeon | +5/−2 lines, 2 files | |
| 0.2.0.0 | 2014-10-21 03:00 UTC | Adeon | +35466/−35304 lines, 62 files | |
| 0.1.0.0 | 2014-10-09 15:47 UTC | Adeon | +35562/−0 lines, 34 filesdep +OpenGLRawdep +basedep +bytestringsetup-changed |
Dependencies of caramia-0.7.2.2
HUnit >=1.2.5.2 && <2.0 1.6.1.0 → 1.6.2.0
| 2021-01-19 18:27 UTC | 1.6.2.0 | +48/−42 lines, 5 filesdep ~call-stackPVP: major bump suggested |
| 2020-10-31 12:09 UTC | 1.6.1.0 | +35/−21 lines, 4 filesPVP ok |
| 2017-03-20 01:42 UTC | 1.6.0.0 | +9/−5 lines, 4 filesdep ~basePVP ok |
| 2016-10-16 03:35 UTC | 1.5.0.0 | +47/−27 lines, 5 filesPVP ok |
| 2016-10-07 03:13 UTC | 1.4.0.0 | +761/−778 lines, 12 filesdep +call-stackPVP ok |
showing 5 of 22 versions
OpenGLRaw >=1.5 3.3.4.0 → 3.3.4.1
| 2021-11-14 15:29 UTC | 3.3.4.1 | +157/−56 lines, 9 filesdep ~bytestringdep ~containersdep ~textPVP: major bump suggested |
| 2019-12-08 17:41 UTC | 3.3.4.0 | +15596/−14166 lines, 50 filesPVP ok |
| 2019-06-10 15:39 UTC | 3.3.3.0 | +534/−307 lines, 33 filesdep ~fixedPVP ok |
| 2019-01-13 14:31 UTC | 3.3.2.0 | +12642/−11549 lines, 620 filesPVP: major bump suggested |
| 2018-08-15 18:46 UTC | 3.3.1.0 | +508/−402 lines, 25 filesPVP ok |
showing 5 of 43 versions
base >=4.7 && <5.0.0.0 4.22.0.0 → 4.22.1.0
| 2026-12-01 12:38 UTC | 4.22.1.0 | +388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested |
| 2025-12-19 11:52 UTC | 4.22.0.0 | +886/−215 lines, 28 filesdep ~ghc-internalPVP ok |
| 2026-03-27 12:26 UTC | 4.21.2.0 | +10/−3 lines, 4 filesdep ~ghc-internalPVP ok |
| 2025-12-27 10:31 UTC | 4.21.1.0 | +17/−5 lines, 4 filesdep ~ghc-internalPVP ok |
| 2024-12-16 09:24 UTC | 4.21.0.0 | +1170/−396 lines, 39 filesdep ~ghc-internalPVP ok |
showing 5 of 61 versions
bytestring >=0.10 && <1.0 0.12.1.0 → 0.12.2.0
| 2024-12-06 21:41 UTC | 0.12.2.0 | +538/−437 lines, 44 filesdep ~QuickCheckdep ~basePVP ok |
| 2024-02-16 03:27 UTC | 0.12.1.0 | +3398/−1642 lines, 37 filesdep +sybdep ~basePVP: major bump suggested |
| 2023-08-16 01:53 UTC | 0.12.0.2 | +16/−2 lines, 3 files |
| 2023-08-05 00:03 UTC | 0.12.0.1 | +47/−9 lines, 3 files |
| 2023-07-07 01:45 UTC | 0.12.0.0 | +1459/−520 lines, 21 filesdep +data-array-bytePVP ok |
showing 5 of 49 versions
containers >=0.5.5 && <1.0 0.8 → 0.8.1
| 2026-10-04 06:08 UTC | 0.8.1 | +8085/−5169 lines, 39 filesdep +template-haskell-liftdep ~arraydep ~deepseqPVP: major bump suggested |
| 2025-03-01 13:03 UTC | 0.8 | +8447/−7031 lines, 37 filesnew-uploaderPVP ok |
| 2023-09-27 12:15 UTC | 0.7 | +76/−33 lines, 3 filesPVP ok |
| 2023-09-28 04:21 UTC | 0.6.8 | +644/−184 lines, 17 filesdep ~basedep ~deepseqPVP: major bump suggested |
| 2023-02-01 03:11 UTC | 0.6.7 | +783/−229 lines, 20 filesPVP: major bump suggested |
showing 5 of 43 versions
exceptions >=0.6 && <1.0 0.10.11 → 0.10.12
| 2026-01-10 20:26 UTC | 0.10.12 | +30/−7 lines, 4 filesdep ~QuickCheckdep ~template-haskellPVP ok |
| 2025-10-13 12:05 UTC | 0.10.11 | +86/−10 lines, 5 filesPVP ok |
| 2025-06-17 11:54 UTC | 0.10.10 | +22/−16 lines, 4 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −test-frameworkdep −test-framework-hunitdep −test-framework-quickcheck2dep ~QuickCheckPVP: major bump suggested |
| 2024-10-31 12:54 UTC | 0.10.9 | +51/−160 lines, 5 filesdep −faildep −transformers-compatdep ~QuickCheckdep ~basedep ~mtlPVP: major bump suggested |
| 2024-04-20 19:31 UTC | 0.10.8 | +1767/−1763 lines, 13 filesdep ~QuickCheckdep ~template-haskellsetup-changedPVP: major bump suggested |
showing 5 of 34 versions
gl >=0.7.3 && <1.0 0.9 → 0.9.1
| 2025-03-03 11:20 UTC | 0.9.1 | +27214/−16008 lines, 484 filesdep ~basedep ~containersnew-uploaderPVP ok |
| 2019-06-16 13:44 UTC | 0.9 | +94464/−96752 lines, 1670 filesdep ~containersdep ~transformerssetup-changedPVP ok |
| 2017-03-25 00:20 UTC | 0.8.0 | +3826/−397 lines, 106 filesdep −directorydep −filepathdep −hxtdep ~containersdep ~halfPVP ok |
| 2016-01-17 15:27 UTC | 0.7.8.1 | +10/−1 lines, 6 filessetup-changedPVP ok |
| 2016-01-17 01:10 UTC | 0.7.8 | +106/−11 lines, 13 filesdep ~transformers |
showing 5 of 26 versions
lens >=4.6 && <5.0 5 → 5.3.6 newer than bounds
| 2026-01-10 22:05 UTC | 5.3.6 newer than bounds | +39/−28 lines, 7 filesdep −ghc-primdep −transformers-compatdep ~template-haskellPVP ok |
| 2025-06-17 11:56 UTC | 5.3.5 newer than bounds | +99/−99 lines, 5 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −HUnitdep −test-frameworkdep −test-framework-hunitdep ~parallelPVP: major bump suggested |
| 2025-03-03 12:24 UTC | 5.3.4 newer than bounds | +156/−44 lines, 14 filesdep ~containersPVP ok |
| 2024-12-28 16:38 UTC | 5.3.3 newer than bounds | +198/−36 lines, 11 filesdep ~basedep ~template-haskellPVP ok |
| 2024-05-12 23:00 UTC | 5.3.2 newer than bounds | +131/−19 lines, 7 filesdep ~hashablePVP: major bump suggested |
showing 5 of 162 versions
linear >=1.18 && <2.0 1.23.2 → 1.23.3
| 2026-01-10 23:39 UTC | 1.23.3 | +11/−12 lines, 2 filesdep −ghc-primdep −semigroupsdep −taggedPVP ok |
| 2025-06-17 11:58 UTC | 1.23.2 | +47/−42 lines, 7 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −HUnitdep −test-frameworkdep −test-framework-hunitPVP: major bump suggested |
| 2025-03-03 12:26 UTC | 1.23.1 | +89/−124 lines, 11 filesdep ~basedep ~containersdep ~randomPVP ok |
| 2024-04-15 22:54 UTC | 1.23 | +7641/−7570 lines, 41 filesdep +QuickCheckdep +test-framework-quickcheck2dep ~hashabledep ~randomsetup-changedPVP ok |
| 2022-11-30 12:37 UTC | 1.22 | +7570/−7551 lines, 35 filesdep ~containersdep ~deepseqdep ~semigroupoidssetup-changedPVP ok |
showing 5 of 90 versions
mtl >=2.1 && <3.0 2.3.1 → 2.3.2
| 2025-12-08 04:58 UTC | 2.3.2 | +112/−21 lines, 12 filesdep ~basenew-uploaderPVP: major bump suggested |
| 2022-10-31 21:28 UTC | 2.3.1 | +188/−33 lines, 8 filesdep ~basePVP: major bump suggested |
| 2022-05-07 20:34 UTC | 2.3 | +1284/−520 lines, 29 filesdep ~basedep ~transformersnew-uploaderPVP ok |
| 2018-02-24 22:15 UTC | 2.2.2 | +152/−36 lines, 14 filesdep ~basePVP: major bump suggested |
| 2014-06-02 02:22 UTC | 2.2.1 | +179/−4 lines, 8 filesdep ~basedep ~transformersPVP: major bump suggested |
showing 5 of 20 versions
sdl2 >=1.3 && <2.0 1.3.1 → 2.5.6.1 newer than bounds
| 2026-08-31 06:33 UTC | 2.5.6.1 newer than bounds | +7/−1 lines, 3 files |
| 2026-06-30 15:10 UTC | 2.5.6.0 newer than bounds | +220/−25 lines, 9 files |
| 2025-03-22 11:12 UTC | 2.5.5.1 newer than bounds | +259/−131 lines, 19 filesdep ~bytestringdep ~text |
| 2023-04-19 19:45 UTC | 2.5.5.0 newer than bounds | +5/−3 lines, 2 filesdep ~lineardep ~text |
| 2023-04-19 19:36 UTC | 2.5.4.1 newer than bounds | +456/−15 lines, 11 filesdep ~basedep ~bytestringdep ~vectornew-component:exe:rendergeometry-example |
showing 5 of 36 versions
semigroups >=0.15 && <1.0 0.20 → 0.20.1
| 2026-01-10 20:32 UTC | 0.20.1 | +29/−2103 lines, 6 filesdep −binarydep −bytestringdep −bytestring-builderdep ~basePVP: major bump suggested |
| 2021-11-16 00:07 UTC | 0.20 | +9/−27 lines, 3 filesdep ~hashablePVP ok |
| 2021-08-30 11:23 UTC | 0.19.2 | +45/−203 lines, 6 filesdep ~hashablePVP ok |
| 2019-08-27 13:06 UTC | 0.19.1 | +100/−60 lines, 5 filesdep ~hashabledep ~transformersPVP ok |
| 2019-05-10 13:57 UTC | 0.19 | +217/−167 lines, 5 filesdep +template-haskelldep ~hashablePVP ok |
showing 5 of 65 versions
test-framework >=0.8.1 && <1.0 0.8.2.2 → 0.8.2.3
| 2026-01-05 13:44 UTC | 0.8.2.3 | +15/−15 lines, 3 filesdep −bytestringdep −old-localedep −semigroupsdep ~ansi-terminaldep ~ansi-wl-pprintdep ~hostnamePVP: major bump suggested |
| 2025-04-11 08:21 UTC | 0.8.2.2 | +34/−35 lines, 3 filesdep −libxmldep −utf8-stringdep ~QuickCheckPVP ok |
| 2025-02-26 19:51 UTC | 0.8.2.1 | +1700/−1542 lines, 55 filesdep +utf8-stringdep −base-orphansdep ~HUnitdep ~QuickCheckdep ~ansi-terminalsetup-changednew-uploaderPVP: major bump suggested |
| 2017-12-30 17:50 UTC | 0.8.2.0 | +134/−79 lines, 13 filesdep +base-orphansdep +semigroupsdep ~QuickCheckdep ~ansi-terminaldep ~ansi-wl-pprintsetup-changedPVP: major bump suggested |
| 2015-01-09 04:04 UTC | 0.8.1.1 | +7/−2 lines, 2 filesdep ~ansi-terminaldep ~timePVP ok |
showing 5 of 34 versions
test-framework-hunit >=0.3.0.1 && <1.0 0.3.0.2 → 0.3.0.3
| 2026-01-05 13:43 UTC | 0.3.0.3 | +42/−40 lines, 4 filesdep −extensible-exceptionsdep ~HUnitdep ~basedep ~test-frameworksetup-changednew-uploaderPVP ok |
| 2015-09-04 15:42 UTC | 0.3.0.2 | +12/−4 lines, 2 filesdep ~HUnitnew-uploader |
| 2013-10-09 00:28 UTC | 0.3.0.1 | +10/−4 lines, 1 filesnew-uploader |
| 2012-12-04 19:56 UTC | 0.3.0 outside bounds | +4/−1 lines, 2 filesdep ~test-frameworkPVP ok |
| 2012-01-27 12:54 UTC | 0.2.7 outside bounds | +5/−5 lines, 2 filesPVP ok |
showing 5 of 12 versions
test-framework-quickcheck2 >=0.3.0.3 && <1.0 0.3.0.6 → 0.3.0.7
| 2026-01-05 13:43 UTC | 0.3.0.7 | +14/−10 lines, 3 filesdep −extensible-exceptionsPVP ok |
| 2025-02-26 19:51 UTC | 0.3.0.6 | +40/−33 lines, 4 filesdep ~QuickCheckdep ~basedep ~randomsetup-changednew-uploaderPVP ok |
| 2018-09-03 17:10 UTC | 0.3.0.5 | +12/−7 lines, 3 filesdep ~QuickCheckdep ~randomPVP ok |
| 2017-06-16 14:41 UTC | 0.3.0.4 | +47/−36 lines, 5 filesdep ~QuickCheckdep ~basedep ~test-frameworksetup-changednew-uploaderPVP: major bump suggested |
| 2014-04-11 10:30 UTC | 0.3.0.3 | +25/−4 lines, 2 filesdep ~QuickCheckdep ~randomdep ~test-frameworknew-uploader |
showing 5 of 24 versions
text >=0.9 && <2.0 1.2.5.0 → 2.1.5 newer than bounds
| 2026-11-27 23:30 UTC | 2.1.5 newer than bounds | +33786/−32979 lines, 58 filesPVP: major bump suggested |
| 2026-01-28 08:30 UTC | 2.1.4 newer than bounds | +30991/−20199 lines, 35 filesdep +template-haskell-liftdep ~QuickCheckdep ~template-haskellPVP ok |
| 2025-08-01 20:08 UTC | 2.1.3 newer than bounds | +2107/−1827 lines, 30 filesdep +splitmixdep +temporarydep ~QuickCheckdep ~ghc-primdep ~template-haskellPVP ok |
| 2024-10-26 13:22 UTC | 2.1.2 newer than bounds | +43588/−15378 lines, 41 filesdep ~basedep ~binaryPVP: major bump suggested |
| 2024-02-16 22:16 UTC | 2.1.1 newer than bounds | +986/−412 lines, 26 filesdep ~QuickCheckdep ~ghc-primdep ~template-haskellPVP: major bump suggested |
showing 5 of 83 versions
transformers >=0.3 && <1.0 0.6.2.0 → 0.6.3.0
| 2026-01-12 12:42 UTC | 0.6.3.0 | +28/−1 lines, 4 filesPVP: major bump suggested |
| 2025-04-06 22:39 UTC | 0.6.2.0 | +41/−42 lines, 8 filesdep ~ghc-primPVP: major bump suggested |
| 2024-09-25 11:37 UTC | 0.6.1.2 | +70/−21 lines, 19 filesPVP: minor bump suggested |
| 2023-08-01 19:13 UTC | 0.6.1.1 | +281/−42 lines, 11 filesPVP ok |
| 2023-02-04 08:15 UTC | 0.6.1.0 | +64/−4 lines, 8 filesPVP ok |
showing 5 of 42 versions
vector >=0.10 && <1.0 0.13.1.0 → 0.13.2.0
| 2024-10-31 18:01 UTC | 0.13.2.0 | +5177/−672 lines, 53 filesdep −HUnitdep ~QuickCheckdep ~basedep ~doctestPVP: major bump suggested |
| 2023-10-07 13:35 UTC | 0.13.1.0 | +302/−238 lines, 22 filesdep ~QuickCheckdep ~basedep ~doctestnew-uploaderPVP: major bump suggested |
| 2022-06-19 19:35 UTC | 0.13.0.0 | +19079/−19259 lines, 70 filesdep +tasty-benchdep +tasty-inspection-testingdep +vector-streamdep −faildep −ghc-primdep −semigroupsdep ~basedep ~doctestdep ~primitivePVP ok |
| 2021-09-21 16:21 UTC | 0.12.3.1 | +265/−191 lines, 13 filesdep ~basedep ~deepseqdep ~doctestPVP ok |
| 2021-04-06 19:54 UTC | 0.12.3.0 | +1218/−39 lines, 11 filesdep ~basedep ~ghc-primPVP ok |
showing 5 of 43 versions
Reverse dependencies
1 packages depend on caramia