MyNixOS website logo
Description

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.

Hackage Build Status

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, if they have MonadIO at bottom.

(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.

Metadata

Version

0.7.2.2

License

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows