• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Haskell
  • License
    Other
  • Created over 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Type-safe, type-level and stateless Haskell graphics framework

What is this?

Hackage License

luminance is an effort to make graphics rendering simple and elegant in Haskell. It’s forked from a larger project which was closed because way too complex and bloated. The aims of luminance are:

  • providing a simple API ;
  • abstract over the trending hardware interfaces (i.e. OpenGL up to now) and approach as close as possible a stateless design ;
  • being a tiny API, so that new comers don’t have to learn a lot of new concepts to get their feet wet.

The first version of luminance will be released of hackage and stackage as a BSD3 library.

What’s included?

luminance is a rendering framework, not a 3D engine. As so, it doesn’t include stuff like lights, materials, asset management nor scene description. It only provides a rendering framework you can plug in whatever libraries you want to. The single restriction – yet – is that you must have an operating system with OpenGL installed.

Features set

  • buffers: buffers are way to communicate with the GPU; they represent regions of memory you can write to and read from. There’re several kinds of buffers you can create, among vertex and index buffers, shader buffer, compute buffer, and so on and so forth… ;
  • framebuffers: framebuffers are used to hold renders. Each time you want to perform a render, you need to perform it into a framebuffer. Framebuffers can then be combined with each other to produce nice effects ;
  • shaders: luminance support six kinds of shader stages:
    • tessellation control shaders ;
    • tessellation evaluation shaders ;
    • vertex shaders ;
    • geometry shaders ;
    • fragment shaders ;
    • compute shaders ;
  • vertices, indices, primitives and shapes: those are used to define a shape you can render into a framebuffer
  • textures: textures represent information packed into arrays on the GPU, and can be used to customize a visual aspect or pass information around ;
  • blending: blending is the process of taking two colors from two framebuffers and mix them between each other ;
  • and a lot of other cool things

What are the prerequisites?

In order to use luminance, you need several prerequisites to be fulfilled. Those prerequisites determine which backend you will be able to use. Currently, two backends are available: gl33 and gl45.

  • a library to setup an OpenGL context.
  • gl33
    • a decent OpenGL 3.3 implementation
    • support for extension GL_ARB_texture_cube_map
  • gl45
    • a decent OpenGL 4.5 implementation
  • gl-45-bindless-textures (bonus)
    • a decent OpenGL 4.5 implementation
    • support for extension GL_ARB_bindless_texture ;

The backends can be enabled through compilation flags. You should only pick one as the more recent will be preferred over others. However, some of the flags can be combined. If you want bindless textures, you should enable the flags gl45 and gl-bindless-textures.

luminance does not provide point a way to create windows because it’s important that it not depend on windowing libraries so that end-users can use whatever they like. Furthermore, such libraries typically implement windowing and events features, which have nothing to do with our initial purposes. However, a few packages might come up, like luminance-glfw if such libraries are judged useful.

How to dig in?

luminance is written to be fairly simple. The documentation – on hackage – is very transparent about what the library does and several articles will appear as the development goes on. Keep tuned!

More Repositories

1

hop.nvim

Neovim motions on speed!
Lua
2,121
star
2

luminance-rs

Type-safe, type-level and stateless Rust graphics framework
Rust
1,073
star
3

mind.nvim

The power of trees at your fingertips.
Lua
704
star
4

this-week-in-neovim-contents

Contents of weekly news delivered by this-week-in-neovim.org.
261
star
5

warmy

Hot-reloading loadable and reloadable resources
Rust
210
star
6

this-week-in-neovim.org

this-week-in-neovim.org official webapp repository
Rust
183
star
7

glsl

GLSL parser for Rust
Rust
180
star
8

splines

Interpolation made easy.
Rust
131
star
9

spectra

Rust demoscene engine (currently on hold)
Rust
124
star
10

shades

Rust EDSL for shading languages
Rust
66
star
11

config

My main configuration files
Lua
65
star
12

cargo-sync-readme

Generate a Markdown section in your README based on your Rust documentation
Rust
55
star
13

toodoux

A task manager based on taskwarrior
Rust
51
star
14

mind

The power of trees at your fingertips
Rust
42
star
15

notisys.nvim

System-wide notifications for Neovim
Lua
40
star
16

do-notation

The Haskell’s do notation brought to Rust
Rust
39
star
17

cheddar

The Cheddar GLSL superset language
Rust
27
star
18

spline-editor

A simple spline editor for the splines crate
Rust
24
star
19

wavefront

Haskell Wavefront OBJ loader library
Haskell
19
star
20

bidule

Very simple and Rust FRP crate
Rust
18
star
21

poesie.nvim

Lua
16
star
22

stack-haddock-upload

A little script to upload documentation to Hackage within a stack-powered project
Shell
14
star
23

learn-luminance

11
star
24

luminance-gl-rs

DEPRECATED luminance-gl has been moved into https://github.com/phaazon/luminance-rs
Rust
11
star
25

celeri-remoulade

The Undead Sceners PC demo for Evoke 2016
Rust
10
star
26

smoothie

Smooth curves via several interpolation modes
Haskell
10
star
27

advent-of-code-2k18

https://adventofcode.com/2018
Rust
9
star
28

phaazon.net

Source code of phaazon.net.
Rust
8
star
29

kak-tree-sitter

tree-sitter meets Kakoune
Rust
8
star
30

try-guard

A guard! macro inspired by the guard Alternative function from Haskell.
Rust
6
star
31

luminance-samples

Luminance samples
Haskell
6
star
32

monad-journal

Pure logger typeclass and monad transformer
Haskell
6
star
33

outline-2017-invitro

Outline 2017 Invitation, by DESiRE and The Undead Sceners (code by @phaazon)
Rust
6
star
34

quaazar

Realtime 3D engine
Haskell
6
star
35

pixels-of-life

A GPU accelerated version of Conway’s Game of Life
Rust
5
star
36

save-z0r

Because those loops are too epic to let them go!
Rust
5
star
37

hsFModEx

FModEx Haskell API. Discontinued.
Haskell
4
star
38

hid

Haskell interface to hidapi
Haskell
4
star
39

any-cache

Cache with any key and any associated value
Rust
4
star
40

zero

Semigroups with absorbing element
Haskell
4
star
41

lightning-road-to-liquid-radiator

Official source code of Lightning Road To Liquid Radiator
C++
4
star
42

lqducul

Rust
4
star
43

cheddar-edit

A shader-toy-like project that aims to shader rapid prototyping
Rust
4
star
44

msi-kb-backlit

A command line tool to change backlit colors of your MSI keyboard
Haskell
3
star
45

reactant

FRP Haskell library
Haskell
3
star
46

non-empty

Efficient non-empty vectors in Rust
Rust
3
star
47

al

Haskell OpenAL raw binding
Haskell
3
star
48

glsl-quasiquote

The glsl! procedural macro for the glsl crate.
3
star
49

awoo

Rust
3
star
50

html-entities

Rust html entities utility functions
Rust
2
star
51

brainfarts

Pets de cerveaux.
2
star
52

kwak

The (in)famous bot you all love on IRC! (see her in action in #demofr@freenode)
Rust
2
star
53

luminance-windowing

Common windowing code for luminance (not an actual backend)
2
star
54

event

Monoidal, monadic and first-class events.
Haskell
2
star
55

par-soeur

Run away, nothing to see here!
Rust
2
star
56

advent-of-code-2021

https://adventofcode.com/
Rust
2
star
57

luminance-glutin

glutin support for luminance
Rust
2
star
58

proc-macro-faithful-display

A more faithful Display for proc-macro token types.
Rust
2
star
59

thunk

Some research project of mine about sharing thunks in Rust
Rust
2
star
60

tellbot

IRC bot with account simple tasks and tells function
Haskell
2
star
61

inject-function

Haskell package that lets you write regular functions with the extra feature to be able to inject parameters that can be shared over function composition
Haskell
2
star
62

leaf

A simple portfolio generator
Haskell
2
star
63

rust-gl-toy

As I’m learning rust, let’s play with OpenGL and GLFW here ;)
Rust
1
star
64

igl

Indexed OpenGL; a safer OpenGL implementation
Haskell
1
star
65

algo

Some famous algorithms, written with fun
Rust
1
star
66

conal_frp

An experiment at implementing FRP as described by its father, Conal Elliott. Paper here http://conal.net/papers/push-pull-frp/push-pull-frp.pdf
Haskell
1
star
67

heat-station

Official source code of Heat Station
C++
1
star
68

chronos

Simple FRP timeline. Designed to be used for demoscene purposes
Haskell
1
star
69

luminance-glfw

GLFW support for luminance
1
star
70

skp

skp D framework
D
1
star
71

advent-of-code-2020

Haskell
1
star
72

gltf

Haskell GLTF loader
Haskell
1
star
73

aur

All packages I maintain in AUR
Shell
1
star
74

codingame-unleash-the-geek

My contribution to Unleash The Geek (started on 7th of October 2019)
Rust
1
star
75

meta

Demoscene framework
Perl
1
star
76

fractalis

A Mandelbrot fractal viewer
C
1
star
77

leetify

Leetify some text!
Haskell
1
star
78

agui

Abstract GUI
Haskell
1
star
79

impersonate

An experimental Markov chain generator that learns how to speak as if it was someone else.
Rust
1
star
80

sdffont

A tool that generates signed distance fields fontmap from font file (.ttf, and so on).
Haskell
1
star
81

hush

Demoscene soft synthesizer designed to be embedded in intros.
Rust
1
star
82

iutbx1-ds

IUT Bordeaux 1 Dimitri Sabadie official repository
C++
1
star
83

atoi-data-dependency

A short and fun study of data dependency and compiler optimizations
Rust
1
star
84

rcpp

A Rust implementation of the C Preprocessor
Rust
1
star
85

colorscheme-gen

A little tool to generate color scheme for urxvt session and using the Text Export option of the colorscheme web site.
Shell
1
star
86

phraskell

Fractal set viewer.
Haskell
1
star
87

blog

phaazon.net blog articles
1
star
88

advent-of-code-2022

Advent of Code 2022 solutions
Rust
1
star