Skip to content

Instantly share code, notes, and snippets.

@thetooth
Created March 31, 2014 09:06
Show Gist options
  • Save thetooth/9888317 to your computer and use it in GitHub Desktop.
Save thetooth/9888317 to your computer and use it in GitHub Desktop.
auto projection = glm::ortho(0.0f, (float)window.width, 0.0f, (float)window.height);
auto view = glm::mat4(1.);
auto ratio = ASPRatio(window, buffer, false);
auto model = glm::scale(
glm::mat4(1.0f),
glm::vec3(ratio.width / float(window.width), ratio.height / float(window.height), 0.0f)
);
auto MVP = projection*view*model;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment