Skip to content

Instantly share code, notes, and snippets.

@tuttlem
Created December 30, 2013 06:56
Show Gist options
  • Save tuttlem/8178731 to your computer and use it in GitHub Desktop.
Save tuttlem/8178731 to your computer and use it in GitHub Desktop.
Camera place
void camera::place(void) {
glm::vec3 viewPoint = this->position + this->viewDir;
// setup opengl with gluLookAt
gluLookAt(
position[0], position[1], position[2],
viewPoint[0], viewPoint[1], viewPoint[2],
upVector[0], upVector[1], upVector[2]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment