mathr / blog / #


Following on from hypercube (which renders a 4D cube, aka a tesseract), I've been working on hyperx, a generalisation to arbitrary dimensions and structures. To this end, I switched from (very slow) CPU based rendering to (very fast) GPU based rendering. Not all is accelerated so far, but the polygon rasterization is several orders of magnitude faster. To get the colours looking good, I'm using GLSL, with a fragment shader that manipulates the rendered image.

hexeract is a temporary branch of hyperx to experiment with, currently it renders a 6D cube. It's heavily based on the HelloGPGPU example (GLSL version) from GPGPU. Hopefully Pd's Gem package for OpenGL will be fixed so I can used shaders in it - just seems to be a matter of using GLEW in the right way, or not converting GLint to float and losing precision, or something.