You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instead something like this should be added to glkit
(defun reinit-vao (vao)
(with-slots ((vao-type type) id vbos vertex-count) vao
(with-slots (groups) vao-type
(loop for group across groups
as vbo-offset = 0 then (+ vbo-offset vbo-count)
as vbo-count = (vao-vbo-count group)
as vbo-subset = (make-array vbo-count :displaced-to vbos
:displaced-index-offset vbo-offset)
as attr-offset = 0 then (+ attr-offset attr-count)
as attr-count = (vao-attr-count group)
do (loop for i from 0 below (vao-attr-count group)
do (%gl:enable-vertex-attrib-array (+ i attr-offset)))
(vao-set-pointers group attr-offset vertex-count vbo-subset)))))
In the guide here http://onrendering.blogspot.no/2011/10/buffer-object-streaming-in-opengl.html it shows that after orphaning the buffer you need to reset your vao. In sketch currently it is only rebound.
instead something like this should be added to glkit
and this be called from start-draw, as in:
This has been working but I think only because there is only one vao.
The text was updated successfully, but these errors were encountered: