Compensate for z-flattening when zooming

This commit is contained in:
Matt Keeter 2014-03-24 19:14:17 -04:00
parent e36ff6ae9c
commit 9283aa4752
2 changed files with 9 additions and 0 deletions

View file

@ -89,6 +89,9 @@ void Canvas::draw_mesh()
mesh_shader.uniformLocation("view_matrix"),
1, GL_FALSE, view_matrix().data());
// Compensate for z-flattening when zooming
glUniform1f(mesh_shader.uniformLocation("zoom"), 1/zoom);
// Find and enable the attribute location for vertex position
const GLuint vp = mesh_shader.attributeLocation("vertex_position");
glEnableVertexAttribArray(vp);