Created
March 25, 2014 07:57
-
-
Save jherico/9757004 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void renderLatencyTestSquare() { | |
OVR::Color colorToDisplay; | |
// If this returns a non-0 value, we're performing a latency | |
// test and must render a colored square underneath the tester | |
// (On the lens axis) | |
if (ovrLatencyTest.DisplayScreenColor(colorToDisplay)) { | |
latencyTestProgram->use(); | |
latencyTestProgram->setUniform("Color", Rift::fromOvr(colorToDisplay)); | |
gl::MatrixStack & mv = gl::Stacks::modelview(); | |
glDisable(GL_DEPTH_TEST); | |
mv.with_push([&]{ | |
mv.identity().translate(glm::vec3(0, 0, -0.1f)).scale(0.005f); | |
GlUtils::renderGeometry(latencyTestQuad, latencyTestProgram); | |
}); | |
glEnable(GL_DEPTH_TEST); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment