Fixed stencil testing sample to actually set the uniform matrices on the single color shader program. Without it, the border does not show up.

This commit is contained in:
Andrew Ames
2017-04-25 14:48:33 -07:00
parent ec4cc678d6
commit 5001977dad

View File

@@ -195,8 +195,8 @@ int main()
glm::mat4 model; glm::mat4 model;
glm::mat4 view = camera.GetViewMatrix(); glm::mat4 view = camera.GetViewMatrix();
glm::mat4 projection = glm::perspective(camera.Zoom, (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f); glm::mat4 projection = glm::perspective(camera.Zoom, (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
shader.setMat4("view", view); shaderSingleColor.setMat4("view", view);
shader.setMat4("projection", projection); shaderSingleColor.setMat4("projection", projection);
shader.use(); shader.use();
shader.setMat4("view", view); shader.setMat4("view", view);