render :: StaticProgramUniforms -> StaticModelRenderer -> IO ()
render uniforms (StaticModelRenderer model) =
    let (Material _ ka kd ks shi) = material model
    in do
        uniform (kaLoc uniforms) ka
        uniform (kdLoc uniforms) kd
        uniform (ksLoc uniforms) ks
        glUniform1f (shiLoc uniforms) $ unsafeCoerce shi
        drawArrays gl_TRIANGLES 0 $ nVertices model

-- | Compute AABB collisioners in view space from the given model.
render :: StaticProgramUniforms -> StaticModelRenderer -> IO ()
render uniforms (StaticModelRenderer model) =
    let (Material _ ka kd ks shi) = material model
    in do
        uniform (kaLoc uniforms) ka
        uniform (kdLoc uniforms) kd
        uniform (ksLoc uniforms) ks
        glUniform1f (shiLoc uniforms) $ unsafeCoerce shi
        drawArrays gl_TRIANGLES 0 $ nVertices model

-- | Compute AABB collisioners in view space from the given model.
render uniforms (StaticModelRenderer model) =
    let (Material _ ka kd ks shi) = material model
    in do
        uniform (kaLoc uniforms) ka
        uniform (kdLoc uniforms) kd
        uniform (ksLoc uniforms) ks
        glUniform1f (shiLoc uniforms) $ unsafeCoerce shi
        drawArrays gl_TRIANGLES 0 $ nVertices model

-- | Compute AABB collisioners in view space from the given model.