[HOpenGL] Pure, garbage-collected graphics resources
conal at conal.net
Mon Jul 20 20:37:53 EDT 2009
I'd like to use some OpenGL resources (VBOs, textures, shaders, and shader
programs) in a functional way, with immutability, garbage collection, and
IO-free creation interfaces. Has anyone played with doing such a thing? I
guess the GC part would involve foreign pointers with foreign finalizers
(which now run promptly in GHC iiuc). I don't know of any reliable way to
add finalizers to Ptr values, because of the unboxing problem .
One tricky issue is that graphics context initialization must take place
before any of these "pure" resources get evaluated. If the APIs allowed
access to to multiple graphics contexts, things would get stickier.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HOpenGL