Example #1
0
void HardHat::setModel() {
   safe_glUniformMatrix4fv(cshader.h_uModelMatrix, glm::value_ptr(modelTrans.modelViewMatrix)); 
}
Example #2
0
/* set the Model transform to the identity */
void SetModelI() {
  glm::mat4 tmp = glm::mat4(1.0f);
  safe_glUniformMatrix4fv(h_uModelMatrix, glm::value_ptr(tmp));
}
Example #3
0
/* projection matrix  - do not change */
glm::mat4 SetProjectionMatrix() {
    glm::mat4 Projection = glm::perspective(80.0f, (float)g_width/g_height, 0.1f, 500.f);
    safe_glUniformMatrix4fv(h_uProjMatrix, glm::value_ptr(Projection));
    return Projection;
}
Example #4
0
/* camera controls - do not change */
void SetView() {
   glUniform3f(h_uCamPos, eye.x, eye.y, eye.z);
   glm::mat4 View = glm::lookAt(eye, target, up);
   safe_glUniformMatrix4fv(h_uViewMatrix, glm::value_ptr(View));
}