(cylinder-3d-init game)

Source

(defn cylinder-3d-init [game] (gl game enable (gl game CULL_FACE)) (gl game enable (gl game DEPTH_TEST)) (let [entity (shape-entity game (primitives/cylinder {:bottom-radius 10, :top-radius 10, :height 30, :radial-subdivisions 10, :vertical-subdivisions 10})) objects (vec (for [i (range 50)] {:tz (rand 150), :rx (rand (* 2 (math PI))), :ry (rand (math PI)), :mat-uniforms {:u_color [(rand) (rand) (rand) 1], :u_specular [1 1 1 1], :u_shininess (rand 500), :u_specularFactor (rand 1)}}))] (assoc game :entity entity :objects objects)))