(set-index-buffer game index-buffer indices)

Source

(defn set-index-buffer [game index-buffer indices] (let [previous-index-buffer (gl game #?(:clj getInteger :cljs getParameter) (gl game ELEMENT_ARRAY_BUFFER_BINDING))] (gl game bindBuffer (gl game ELEMENT_ARRAY_BUFFER) index-buffer) (gl game bufferData (gl game ELEMENT_ARRAY_BUFFER) indices (gl game STATIC_DRAW)) (gl game bindBuffer (gl game ELEMENT_ARRAY_BUFFER) previous-index-buffer) (#?(:clj count :cljs .-length) indices)))