AE
Size: a a a
AE
AE
(defun add-uniform (material name slot-name)
"Name is name uniform name in the shader.
Slot-name is the name of corresponding slot in the shader"
(push (cons name slot-name)
(uniforms material)))
(defun set-uniforms (material)
"Set all uniform parameters"
(with-slots (shader uniforms) material
(loop :for (name . slot) :in uniforms :do
(s:set-uniform shader name (slot-value material slot)))))
SA
SA
SA
SA
VL
A
A
VL
AE
AE
SA
AE
Interface-Passing Style in Common Lisp has a definite low-level feeling, in that the user is given both full control and full responsibility with respect to passing around appropriate interfaces, which is compounded the fact that Common Lisp has dynamic typing rather than static typing, so that the evaluator will not issue errors or emit warnings at compile-time if you pass interfaces and arguments that do not match each other.
AE