[Openmcl-devel] getting CCL ready for CS graphics courses

Alexander Repenning ralex at cs.colorado.edu
Fri Jan 9 22:20:26 PST 2009


On Jan 8, 2009, at 6:37 PM, Terje Norderhaug wrote:

> On Jan 8, 2009, at 5:05 PM, Alexander Repenning wrote:
>> At least for the vector caveat we have a solution. The approach taken
>> may sound a bit crazy. We are implementing vector constants with a
>> combination of Lisp readers and Universally Unique Identifiers.
>> Perhaps not super elegant, there is bound to be a better solution,  
>> but
>> it works.  Code at the end. A call to a vector function looks like
>> this
>>
>> (glColor3fv {0.5 0.1 0.8})
>>
>> which is pretty close to what students "know" from C. The only issue
>> is that getting the cached value is not that fast. The hash table
>> access it the bottleneck.
>
> What about only looking up the value at compile time? As in:
>
> (glColor3fv #.{0.5 0.1 0.8})

I don't think the Lisp compiler could handle that because it would try  
to dump a foreign  pointer.



More information about the Openmcl-devel mailing list