set viewport in PGL.drawTexture(), fixes #1869

This commit is contained in:
codeanticode
2013-08-20 11:42:30 -04:00
parent 2b7eef70b8
commit b20e667256
3 changed files with 25 additions and 5 deletions

View File

@@ -3372,10 +3372,8 @@ public class PGraphicsOpenGL extends PGraphics {
if (textTex.currentTex != info.texIndex) {
textTex.setTexture(info.texIndex);
}
PImage tex = textTex.getCurrentTexture();
beginShape(QUADS);
texture(tex);
texture(textTex.getCurrentTexture());
vertex(x0, y0, info.u0, info.v0);
vertex(x1, y0, info.u1, info.v0);
vertex(x1, y1, info.u1, info.v1);