[cl-opengl-devel] checker.lisp (Redbook example)

raito at raito.com raito at raito.com
Thu Oct 2 15:04:53 UTC 2008


Well, I was already working on porting the redbook examples to Lisp (at 
least the ones that hadn't been done yet). And as Luis pointed out, 
doing that is on the list. So here's the first one, ported from 
checker.c. It's a texture-mapping example. I have some others that need 
cleaning up, because prior to updating my stuff, I had to do things 
like code-char key in keyboard, because that's just how it worked on 
the Mac. I have noticed that some of the redbook examples can't 
currently be ported, because cl-opengl doesn't offer all the functions 
yet. 

I wasn't able to use '(64 64) when creating the texture map, because I 
get this error:

* (load "checker.lisp")
; in: LAMBDA NIL
;     (SETF (AREF RET-VAL (+ BASE 1)) 255)
; --> SB-KERNEL:%ASET
; ==>
;   RET-VAL
;
; note: deleting unreachable code

;     (SETF (AREF RET-VAL BASE) 255)
; ==>
;   (SB-KERNEL:%ASET RET-VAL BASE 255)
;
; caught WARNING:
;   Asserted type VECTOR conflicts with derived type
;   (VALUES (SIMPLE-ARRAY T (64 64)) &OPTIONAL). 
;   See also:
;     The SBCL Manual, Node "Handling of Types"

And I haven't included an update to examples.lisp -- it's just adding 
it to the list of examples, and examples doesn't actually run the 
examples unless you've already loaded them (I might work on that for 
the future). 

Neil Gilmore
raito at raito.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: checker.lisp
Type: application/octet-stream
Size: 2921 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-opengl-devel/attachments/20081002/1d9dbf2a/attachment.obj>


More information about the cl-opengl-devel mailing list