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 pureIO
and also in your custom monad stacks, as long as they implementMonadIO
.
(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.
[Skip to Readme]
Modules
[Index]
- Graphics
- Graphics.Caramia
- Graphics.Caramia.Blend
- Graphics.Caramia.Buffer
- Graphics.Caramia.Color
- Graphics.Caramia.Context
- Graphics.Caramia.Framebuffer
- Graphics.Caramia.ImageFormats
- Internal
- Graphics.Caramia.Memory
- Graphics.Caramia.OpenGLResource
- Graphics.Caramia.Prelude
- Graphics.Caramia.Query
- Graphics.Caramia.Render
- Graphics.Caramia.Resource
- Graphics.Caramia.Shader
- Graphics.Caramia.Sync
- Graphics.Caramia.Texture
- Graphics.Caramia.VAO
- Graphics.Caramia
Flags
Automatic Flags
Name | Description | Default |
---|---|---|
build-toys | Build some toy programs to test and play with. | Disabled |
fix-opengl21 | Makes the library think only OpenGL 2.1 is available. This can be useful for debugging. | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- caramia-0.7.2.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.3.0.0, 0.3.0.1, 0.4.0.0, 0.5.0.0, 0.6.0.0, 0.7.0.0, 0.7.0.1, 0.7.1.0, 0.7.1.1, 0.7.2.0, 0.7.2.1, 0.7.2.2 |
---|---|
Change log | changelog.md |
Dependencies | base (>=4.7 && <5.0.0.0), bytestring (>=0.10 && <1.0), caramia, containers (>=0.5 && <1.0), exceptions (>=0.6 && <1.0), gl (>=0.7.3 && <1.0), lens (>=4.6 && <5.0), linear (>=1.18 && <2.0), mtl (>=2.1 && <3.0), OpenGLRaw (>=1.5), sdl2 (>=1.3 && <2.0), semigroups (>=0.15 && <1.0), text (>=0.9 && <2.0), transformers (>=0.3 && <1.0), vector (>=0.10 && <1.0) [details] |
License | MIT |
Copyright | Copyright (c) 2014-2015 Mikko Juola |
Author | Mikko Juola |
Maintainer | mikjuo@gmail.com |
Category | Graphics |
Home page | https://github.com/Noeda/caramia/ |
Bug tracker | https://github.com/Noeda/caramia/issues/ |
Source repo | head: git clone https://github.com/Noeda/caramia.git |
Uploaded | by Adeon at 2015-05-09T08:24:16Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Executables | textures, query-objects, gl-info, memory-info, smoke-test |
Downloads | 10888 total (11 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |