4 (defparameter *textures
* (make-hash-table :test
'eql
)
5 "A table of textures.")
8 ((diffuse :accessor diffuse-color-of
:initform
(new-colour))
9 (ambient :accessor ambient-color-of
:initform
(new-colour))
10 (specular :accessor specular-color-of
:initform
(new-colour)))
11 (:metaclass closer-mop
:funcallable-standard-class
)
12 (:documentation
"Material associated with mesh polygons"))
15 ((id :allocation
:class
:reader id-of
:initform
(get-universal-time))
16 (width :accessor width-of
:initarg
:width
)
17 (height :accessor height-of
:initarg
:height
)
18 (map :accessor map-of
:initarg
:map
)))
23 (defun make-texture (&key width height colour-map
)
25 (make-instance 'texture
:width width
:height height
:map colour-map
))
28 (setf (gethash (id-of texture
) *textures
*) texture
)
29 (incf (slot-value texture
'id
))