(defn
create-program
[game v-source f-source]
(let
[vertex-shader
(create-shader game (gl game VERTEX_SHADER) v-source)
fragment-shader
(create-shader game (gl game FRAGMENT_SHADER) f-source)
program
(gl game createProgram)]
(gl game attachShader program vertex-shader)
(gl game attachShader program fragment-shader)
(gl game linkProgram program)
(gl game deleteShader vertex-shader)
(gl game deleteShader fragment-shader)
(if
#?(:clj (= (gl game TRUE) (gl game getProgrami program (gl game LINK_STATUS))) :cljs (gl game getProgramParameter program (gl game LINK_STATUS)))
program
(throw (ex-info (gl game getProgramInfoLog program) {})))))