Created
January 5, 2022 12:56
-
-
Save lokedhs/8b4d84558f7a7b6dcf3c9c33490bd028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmethod tess-begin-polygon ((tess tessellator) &optional (polygon-data nil)) | |
(let* ((polygon-data-id | |
(or (loop for value being the hash-values of (polygon-data tess) | |
using (hash-key key) | |
when (eq value polygon-data) | |
return key) | |
(hash-table-count (polygon-data tess)))) | |
(foreign-key (foreign-alloc :uint64 :initial-contents (list (id tess) polygon-data-id)))) | |
(setf (gethash polygon-data-id (polygon-data tess)) polygon-data) | |
(save-data-to-free foreign-key tess) | |
(glu-tess-begin-polygon (glu-tessellator tess) foreign-key))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment