Fix color stream import from classimp
This commit is contained in:
parent
7966bb14a1
commit
5daadb78b6
2 changed files with 7 additions and 4 deletions
|
|
@ -31,6 +31,7 @@
|
|||
(ecase type
|
||||
(:unsigned-char 1)
|
||||
(:unsigned-short 2)
|
||||
(:unsigned-int 4)
|
||||
(:float 4)))
|
||||
|
||||
(defun ctype-to-gltype (ctype)
|
||||
|
|
|
|||
|
|
@ -75,10 +75,12 @@
|
|||
(coerce (loop for i below (array-total-size (classimp:meshes ai-scene))
|
||||
for mesh = (aref (classimp:meshes ai-scene) i)
|
||||
collect (make-mesh
|
||||
(remove nil (list (import-stream (classimp:vertices mesh)
|
||||
:position)
|
||||
(import-stream (classimp:colors mesh)
|
||||
:color)))
|
||||
(remove nil
|
||||
(list (import-stream (classimp:vertices mesh)
|
||||
:position)
|
||||
(when (> (length (classimp:colors mesh)) 0)
|
||||
(import-stream (aref (classimp:colors mesh) 0)
|
||||
:color))))
|
||||
(import-faces (classimp:faces mesh) (import-modes mesh))))
|
||||
'vector)
|
||||
:root-node (import-nodes (classimp:root-node ai-scene)))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue