Skip to content

Instantly share code, notes, and snippets.

@jherico
Created March 25, 2014 21:39
Show Gist options
  • Save jherico/9771959 to your computer and use it in GitHub Desktop.
Save jherico/9771959 to your computer and use it in GitHub Desktop.
template <typename Function>
void for_each_eye(Function f){
for (Eye eye = LEFT; eye <= RIGHT; eye = static_cast<Eye>(eye + 1)) {
f(eye);
}
}
...
for_each_eye([&](Eye eye){
eyeArgs[eye].lookupTexture =
helper.createLookupTexture(glm::uvec2(512, 512), eye);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment