I was thinking about making a Scheme based graphics programming language. The API would be similar to RenderMan and AL (Animation Language), but designed around OpenGL and hardware acceleration.
Scheme is a dialect of lisp which is statically scoped (like C) and properly tail recursive (which means the intrepreter/compiler can properly optimize some recursive structures into loops if possible). In otherwords, a compiler could produce code almost as efficient as C.
I chose Scheme because its incredibly simple but at the same time fairly powerful. It makes an easy to learn extension language.
Everything that needs to be fast would be implemented in C, and take advantage of extensions like VAR and VAO. I would make an immediate mode interface for sending geometry one vertex at a time, but for performance the language would definitely favor batching of geometry and state.
I think that a Scheme description would be much better and powerful than implementing a custom shading language as ATI recommends in their recent presentation (e.g., Quake 3’s shading language).
I’m going to be designing this thing from front to back before coding, so I wanted some people’s initial impression. Would you prefer a non-executable description language like Quake 3 or nVIDIA’s FX files or a simple extendable and compilable scripting language like Scheme?
And please, no snide remarks about Scheme having too many parenteses
Also, I’ve already looked at a few implementations of scheme and have decided to implement my own intrepreter/compiler eventually. Firstly because none of them have garbage collectors that would work well in a nearly real-time environment like OpenGL programming, secondly I believe I could optimize a custom scheme intrepreter/compiler for OpenGL, and secondly because I have the skill set required to write a compiler, but I never have, so I want to (it’s my second passion after graphics).