• This repository has been archived on 09/Nov/2017
  • Stars
    star
    354
  • Rank 120,042 (Top 3 %)
  • Language
    Clojure
  • Created over 15 years ago
  • Updated over 8 years ago

Reviews

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

Repository Details

not under active development - idiomatic opengl bindings for clojure

Port of legacy Penumbra circa Clojure 1.2 to Clojure 1.8+

This is an update of Zach Tellman’s impressive penumbra library.
All of the legacy cruft from clojure.contrib has been migrated or
removed. Currently this is a stability release intended to get the
examples working. They all compile and run, however, many of the
examples that rely on shader implementations (like a bunch of the
demos in test/examples/opengl) rather than the fixed function
pipeline, will drop out when you run them.

I’m not sure where to go with this library, but it seemed a waste to
leave it in the dustbin. I’m currently evaluating alternatives for
rendering, and I remembered penumbra.
-Tom

Penumbra is not under active development.
However, it’s still a fun way to play around with OpenGL and Clojure. Bugs will be fixed, time permitting, but new features are unlikely.

Penumbra is an idiomatic wrapper for OpenGL in Clojure, by way of LWJGL.

This Java/C code

glEnable(GL_LIGHT0);
glPushMatrix();
glTranslated(0, 0, -10);
glBegin(GL_QUADS);
glVertex3d(0, 0, 0);
glVertex3d(0, 1, 0);
glVertex3d(1, 1, 0);
glVertex3d(1, 0, 0);
glEnd();
glPopMatrix();

becomes

(enable :light0)
(push-matrix
  (translate 0 0 -10)
  (draw-quads
    (vertex 0 0 0)
    (vertex 0 1 0)
    (vertex 1 1 0)
    (vertex 1 0 0)))

Numerous sample programs can be found in /src/example. They include clean, functional implementations of Tetris and Asteroids, and a GPU-driven Mandelbrot viewer.

A long term goal for Penumbra is to simplify GPU programming as much as possible, allowing for both advanced graphical effects and general computation. This is a work in progress, but this n-body simulation is a good example of what’s possible.

Using Penumbra

Directions for installation and use in other projects can be found here.

If you have any questions, please visit the mailing list.

More Repositories

1

lamina

not under active development - event-driven workflows for clojure
Clojure
709
star
2

automat

better automata through combinators
Clojure
587
star
3

rhizome

simple graph and tree visualization
Clojure
446
star
4

vertigo

heterogeneous structs for clojure
Clojure
207
star
5

riddley

code-walking without caveats
Clojure
197
star
6

clj-tuple

efficient small collections for clojure
Java
179
star
7

narrator

expressive, composable stream analysis
Clojure
152
star
8

proteus

local. mutable. variables.
Clojure
113
star
9

sleight

whole-program transformations in clojure
Clojure
98
star
10

calx

not under active development - idiomatic opencl bindings for clojure
Clojure
84
star
11

collection-check

fuzz testing for alternate clojure data structures
Clojure
64
star
12

pushkin

shall we play a game?
Clojure
59
star
13

immutable-bitset

space-efficient immutable integer sets
Clojure
51
star
14

immutable-int-map

a map optimized for integer keys
Clojure
40
star
15

aloha

a simple, friendly webserver
Clojure
36
star
16

cambrian-collections

a veritable explosion of data structures
Clojure
29
star
17

cantor

not under active development - primitive math for clojure
Clojure
26
star
18

clj-radix

a persistent radix tree, for efficient nested maps
Clojure
21
star
19

lein-jammin

a window into your stuck process
Clojure
18
star
20

everything-will-flow

necessary code for my upcoming clojure/west 2015 talk
Clojure
18
star
21

duel

a testing ground for programs that play go
Clojure
10
star
22

bizarro-collections

you got your clojure semantics in my mutable hash-map
Java
8
star
23

ergo

a monte-carlo simulator for computer go
C++
5
star
24

scrawl

the graphical equivalent of the fibonacci sequence
Clojure
4
star
25

java9-failure

Clojure
1
star
26

aleph.io

static website for aleph
CSS
1
star