Advertisement
Guest User

Untitled

a guest
Mar 14th, 2018
140
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defmethod uniforms-init ((sphere glfw-sphere-source) (shader-program integer))
  2. (let ((r (coerce (radius sphere) 'single-float))
  3. (model-view-matrix (make-instance 'transform-3d))
  4. (mvm-data (make-array 16)))
  5. (setf (translate model-view-matrix) (center sphere))
  6. (setf (scale model-view-matrix) (vector r r r 1))
  7. (flatten model-view-matrix mvm-data)
  8. (gl:uniform-matrix
  9. (gl:get-uniform-location shader-program "ModelMatrix")
  10. 4 (vector mvm-data))))
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement