Skip to content

Instantly share code, notes, and snippets.

@tgfrerer
Last active December 15, 2015 03:49
Show Gist options
  • Save tgfrerer/5197178 to your computer and use it in GitHub Desktop.
Save tgfrerer/5197178 to your computer and use it in GitHub Desktop.
flipped vertex draw order to check if that un-messes texture coordinate problems with NVIDIA cards whilst keeping it sane for everyone else =)
ofPushMatrix();
ofTranslate(x,y,z);
quad.getVertices()[0].set(px0,py0);
quad.getVertices()[1].set(px1,py0);
quad.getVertices()[3].set(px0,py1); // flipped
quad.getVertices()[2].set(px1,py1); // flipped
quad.getTexCoords()[0].set(tx0,ty0);
quad.getTexCoords()[1].set(tx1,ty0);
quad.getTexCoords()[3].set(tx0,ty1); // flipped
quad.getTexCoords()[2].set(tx1,ty1); // flipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment