Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Small refactoring.

  • Loading branch information...
commit ea7d79eeca9ff321fa265109591d865bfc6ee515 1 parent f2e983f
Boian Tzonev authored

Showing 1 changed file with 12 additions and 15 deletions. Show diff stats Hide diff stats

  1. +12 15 examples/redbook/tess.lisp
27 examples/redbook/tess.lisp
@@ -100,22 +100,19 @@
100 100 (gl:vertex (first vertex-data) (second vertex-data) (third vertex-data)))
101 101
102 102 (defmethod glu:combine-data-callback ((tess star-tessellator) coords vertex-data weight polygon-data)
103   - (let ((vertex '()))
104   - ;;todo refactor this
105   - (loop for i from 3 downto 0
106   - do (push (gl:glaref coords i) vertex))
  103 + (nconc
  104 + (loop for i from 0 below 3
  105 + collect (gl:glaref coords i))
107 106
108   - (loop for i from 5 downto 0
109   - do (push (+ (* (gl:glaref weight 0)
110   - (nth i (aref vertex-data 0)))
111   - (* (gl:glaref weight 1)
112   - (nth i (aref vertex-data 1)))
113   - (* (gl:glaref weight 2)
114   - (nth i (aref vertex-data 2)))
115   - (* (gl:glaref weight 3)
116   - (nth i (aref vertex-data 3))))
117   - vertex))
118   - vertex))
  107 + (loop for i from 3 below 6
  108 + collect (+ (* (gl:glaref weight 0)
  109 + (nth i (aref vertex-data 0)))
  110 + (* (gl:glaref weight 1)
  111 + (nth i (aref vertex-data 1)))
  112 + (* (gl:glaref weight 2)
  113 + (nth i (aref vertex-data 2)))
  114 + (* (gl:glaref weight 3)
  115 + (nth i (aref vertex-data 3)))))))
119 116
120 117 (defun rb-tess ()
121 118 (glut:display-window (make-instance 'tess-window)))

0 comments on commit ea7d79e

Please sign in to comment.
Something went wrong with that request. Please try again.